We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ns -v --json
1 parent e59f1ad commit d7330b0Copy full SHA for d7330b0
lib/common/dispatchers.ts
@@ -105,6 +105,12 @@ export class CommandDispatcher implements ICommandDispatcher {
105
private async printVersion(): Promise<void> {
106
this.$logger.info(this.$staticConfig.version);
107
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
+
114
const spinner = this.$terminalSpinnerService.createSpinner();
115
spinner.start("Checking for updates...");
116
const nativescriptCliVersion = await this.$versionsService.getNativescriptCliVersion();
0 commit comments