Skip to content

Commit

Permalink
More cli tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
doesdev committed Mar 18, 2018
1 parent bb0836b commit 09351e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cli-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
'use strict'

const go = require('./index.js')({update: true})()
if (go.stdout && go.sterr) {
if (go.stdout && go.stderr) {
go.stdout.pipe(process.stdout)
go.stderr.pipe(process.stderr)
go.catch(() => {})
} else {
go.then((r) => console.log(r.stdout))
go.then((r) => console.log(r.stdout || r))
go.catch((err) => console.error(err.message || err))
}
4 changes: 2 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

const args = process.argv.slice(2)
const go = require('./index.js')()(args)
if (go.stdout && go.sterr) {
if (go.stdout && go.stderr) {
go.stdout.pipe(process.stdout)
go.stderr.pipe(process.stderr)
go.catch(() => {})
} else {
go.then((r) => console.log(r.stdout))
go.then((r) => console.log(r.stdout || r))
go.catch((err) => console.error(err.message || err))
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngo",
"version": "2.4.1",
"version": "2.4.2",
"description": "Run Go commands, whether your Go env is in place or not",
"main": "index.js",
"files": [
Expand Down

0 comments on commit 09351e2

Please sign in to comment.