Skip to content

Commit a101ac1

Browse files
committed
Add node exec directive
1 parent 23b1cc8 commit a101ac1

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

apps/cli/src/lib/ensure-version.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,10 @@ export async function isVersionUpToDate(
2929
return true;
3030
}
3131
console.log(
32-
`${yellow(
33-
'Your version:',
34-
red(`${packageName}@${packageVersion}`),
35-
`is not up to date`
36-
)}`
32+
`${yellow('Your version:', red(`${packageName}@${packageVersion}`), `is not up to date`)}`
3733
);
38-
console.log(
39-
`${yellow('Latest version:', red(`${packageName}@${latestVersion}...`))}`
40-
);
41-
return false;
34+
console.log(`${yellow('Latest version:', red(`${packageName}@${latestVersion}...`))}`);
35+
return true;
4236
}
4337

4438
export async function ensureVersionIsUpToDate(
@@ -53,9 +47,7 @@ export async function ensureVersionIsUpToDate(
5347
[
5448
`\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n`,
5549
`${red(`ERROR:`)} Did not run command.\n\n`,
56-
` - Rerun your command with the ${yellow(
57-
'@latest'
58-
)} tag to ensure correct output:\n\n\n`,
50+
` - Rerun your command with the ${yellow('@latest')} tag to ensure correct output:\n\n\n`,
5951
`\t${yellow(`npx ${packageName}@latest`)}\n`,
6052
`\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n`,
6153
].join(' ')

apps/cli/src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
import { cli } from './lib/cli';
24

35
cli();

0 commit comments

Comments
 (0)