Skip to content

Commit

Permalink
If no args passed default to help
Browse files Browse the repository at this point in the history
  • Loading branch information
doesdev committed Apr 15, 2018
1 parent 699fce9 commit ab57778
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = (opts = {}) => {
}

function runner (args, opts, binary) {
if (!args) return Promise.reject(new Error(`No Go command specified`))
if (!args) args = binary ? [] : ['help']
args = Array.isArray(args) ? args : [args]
let env = opts.env
if (binary && env.GOBIN) binary = path.join(env.GOBIN, binary)
Expand Down
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.8",
"version": "2.4.9",
"description": "Run Go commands from Node or CLI, Go env not required",
"engines": {
"node": ">=6.0.0"
Expand Down

0 comments on commit ab57778

Please sign in to comment.