Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
fix(generators/command): assert cwd is a project (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
zcei authored and jdx committed Apr 2, 2018
1 parent 1bfcafe commit 192f268
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generators/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class CommandGenerator extends Generator {

async prompting() {
this.pjson = this.fs.readJSON('package.json')
this.pjson.oclif = this.pjson.oclif || {}
if (!this.pjson) throw new Error('not in a project directory')
this.pjson.oclif = this.pjson.oclif || {}
this.log(yosay(`Adding a command to ${this.pjson.name} Version: ${version}`))
}

Expand Down

0 comments on commit 192f268

Please sign in to comment.