Skip to content

Commit

Permalink
chore: add app version to args
Browse files Browse the repository at this point in the history
  • Loading branch information
saucecodee committed Nov 16, 2020
1 parent b748e6d commit 93315a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/utils/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const yargs = require("yargs-parser")
const app = {}
const { cmdAlias } = require("./../config")
const help = require("./../cmd/help")
const package = require("./../../package.json")

const options = {
new: {
Expand Down Expand Up @@ -35,6 +36,7 @@ app.parse = () => {
if (!cmdAlias[cmd]) throw new Error(`banga: "${cmd}" is not a recognised command or alias`)

args.$cmd = cmdAlias[cmd]
args.$version = package.version

process.ARGS = { ...options[args.$cmd], ...args }
}
Expand Down

0 comments on commit 93315a3

Please sign in to comment.