Skip to content

Commit d7330b0

Browse files
committed
feat: ns -v --json to skip update checks
1 parent e59f1ad commit d7330b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/common/dispatchers.ts

+6
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ export class CommandDispatcher implements ICommandDispatcher {
105105
private async printVersion(): Promise<void> {
106106
this.$logger.info(this.$staticConfig.version);
107107

108+
if (this.$options.json) {
109+
// we don't check for updates when --json is passed
110+
// useful for tools that rely on the output of the command
111+
return;
112+
}
113+
108114
const spinner = this.$terminalSpinnerService.createSpinner();
109115
spinner.start("Checking for updates...");
110116
const nativescriptCliVersion = await this.$versionsService.getNativescriptCliVersion();

0 commit comments

Comments
 (0)