mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-04-26 22:10:11 +00:00
Add support for global --debug flag
Change-type: patch Resolves: #1777 Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
parent
ad0b667bc7
commit
db247307db
@ -52,6 +52,13 @@ export async function routeCliFramework(argv: string[], options: AppOptions) {
|
||||
cmdSlice.shift();
|
||||
cmdSlice.push('--help');
|
||||
}
|
||||
|
||||
// support global --debug flag
|
||||
const debugIndex = cmdSlice.indexOf('--debug');
|
||||
if (debugIndex > -1) {
|
||||
process.env.DEBUG = '1';
|
||||
cmdSlice.splice(debugIndex, 1);
|
||||
}
|
||||
}
|
||||
|
||||
const [isOclif, isTopic] = isOclifCommand(cmdSlice);
|
||||
|
Loading…
x
Reference in New Issue
Block a user