Skip to content

Commit

Permalink
perf(exec): tune up cmd logging
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Nov 19, 2018
1 parent 5c1550d commit 9fce45e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ const cp = require('child_process')

module.exports = {
run(cmd) {
try {
return cp.execSync('' + cmd).toString().trim()
log('cmd=', cmd)

try {
const res = cp.execSync('' + cmd).toString().trim()
log('res=', res)
return res
} catch (err) {
log('execution failed')
log('cmd=', cmd)
log('err=', err)
}
}
Expand Down

0 comments on commit 9fce45e

Please sign in to comment.