Commit 8004b438 authored by Gabriele De Blasi's avatar Gabriele De Blasi
Browse files

minor corrections

parent 546a92d2
Pipeline #2891109 passed with stages
in 9 minutes and 41 seconds
......@@ -2,7 +2,7 @@
const
EventEmitter = require('events'),
{ get, isEmpty, isUndefined } = require('lodash'),
{ get, isEmpty, isNil } = require('lodash'),
BashScript = require('./BashScript'),
{ SSHCmd, Systemctl } = require('./SSHCmd');
......@@ -77,7 +77,7 @@ class ActionRunner extends EventEmitter {
await this._proc.exec()
.then((data) => {
if (!isUndefined(data)) { this.emit('return', data);}
if (!isNil(data)) { this.emit('return', data);}
})
.finally(this._proc.removeAllListeners.bind(this._proc));
}
......
......@@ -42,7 +42,7 @@ class SSHCmd extends Action {
this.args = [ '-T', '-o', 'StrictHostKeyChecking=no', '-i', `${keyPath}`,
`${user}@${host}`, this.sshCmd ];
this.opts = { shell: false };
this.return = 'Command performed (exit code: 0).';
this.return = 'Command performed.';
}
if (tmpFile) {
......@@ -68,7 +68,7 @@ class Systemctl extends SSHCmd {
undefined;
super(info, credentials);
this.service = service;
this.return = 'Service restarted (exit code: 0).';
this.return = 'Service restarted.';
}
async exec() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment