Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ export function runMain(): void {
return;
}

// Print a clean, parseable version and exit before citty handles it. citty
// routes `--version` through consola, whose CI reporter (active when CI=1)
// prefixes output with "[log] " — that breaks scripts doing
// `ranch --version` and the publish-time stale-dist check.
const argv = process.argv.slice(2);
if (argv.length === 1 && (argv[0] === "--version" || argv[0] === "-v")) {
console.log(currentVersion());
process.exit(0);
}

if (!updatesDisabled()) scheduleBackgroundCheck();

if (!updatesDisabled() && !skipNoticeForCommand()) {
Expand Down
Loading