Skip to content

Commit d62784a

Browse files
committed
Code cleanup from redundant falsy checks in installer.js
1 parent e3d474b commit d62784a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

browser/model/helpers/installer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ class Installer {
1919
return new Promise((resolve, reject) => {
2020
Logger.info(this.key + ' - Execute command ' + command);
2121
child_process.exec(command, options, (error, stdout, stderr) => {
22-
if (error && error !== '') {
22+
if (error) {
2323
Logger.error(this.key + ' - ' + error);
2424
Logger.error(this.key + ' - ' + stderr);
2525
reject(error);
2626
} else {
27-
if (stdout && stdout != '') {
27+
if (stdout) {
2828
Logger.info(this.key + ' - ' + stdout);
2929
}
3030
Logger.info(this.key + ' - Execute ' + command + ' SUCCESS');
@@ -39,12 +39,12 @@ class Installer {
3939
Logger.info(this.key + ' - Execute ' + file + ' ' + args);
4040
child_process.execFile(file, args, {'maxBuffer': 1024*1024} , (error, stdout, stderr) => {
4141
// vagrant exits with code 3010
42-
if (error && error !== '' && error.code !== 3010) {
42+
if (error && error.code !== 3010) {
4343
Logger.error(this.key + ' - ' + error);
4444
Logger.error(this.key + ' - ' + stderr);
4545
reject(error);
4646
} else {
47-
if (stdout && stdout != '') {
47+
if (stdout) {
4848
Logger.info(this.key + ' - ' + stdout);
4949
}
5050
Logger.info(this.key + ' - Execute ' + file + ' ' + args + ' SUCCESS');

0 commit comments

Comments
 (0)