Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 84b8a41

Browse files
committed
Add cli option to disable update check
1 parent 3615d52 commit 84b8a41

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ import { checkForCliUpdate, ensureNode12 } from "./cli";
66

77
// This file gets imported by the index.js file of the repository root.
88

9-
ensureNode12();
10-
checkForCliUpdate();
11-
12-
yargs(process.argv.slice(2))
9+
const argv = yargs(process.argv.slice(2))
1310
.scriptName("nodecg-io")
1411
.usage("$0 <cmd> [args]")
1512
.version(version)
1613
.command(installModule)
1714
.command(uninstallModule)
15+
.option("disable-updates", { type: "boolean", description: "Disables check for nodecg-io-cli updates" })
1816
.strict()
1917
.demandCommand().argv;
18+
19+
ensureNode12();
20+
if (!argv["disable-updates"]) {
21+
checkForCliUpdate();
22+
}

0 commit comments

Comments
 (0)