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

Commit

Permalink
fix: fixed parent module path
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 3, 2018
1 parent 847cc26 commit 209d4ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/command.ts
Expand Up @@ -80,7 +80,7 @@ export default abstract class Command {
protected debug: (...args: any[]) => void

constructor(public argv: string[], options: Config.Options) {
this.config = Config.load(options || module.parent && module.parent.filename || __dirname)
this.config = Config.load(options || module.parent && module.parent.parent && module.parent.parent.filename || __dirname)
this.debug = require('debug')(this.ctor.id ? `${this.config.bin}:${this.ctor.id}` : this.config.bin)
this.debug('init version: %s argv: %o', this.ctor._base, argv)
cli.config.context.command = _.compact([this.ctor.id, ...argv]).join(' ')
Expand Down

0 comments on commit 209d4ff

Please sign in to comment.