Skip to content

Commit 24407d8

Browse files
authored
Fix CLI_VERSION ReferenceError in pnpm dev (#94)
1 parent 1ae492d commit 24407d8

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/index.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ import { error, info, setJsonMode, setLogLevel, setStderr, verbose, warn } from
2626
import { pluralize } from "./util";
2727
import { buildUserAgent } from "./user-agent";
2828
import { withRetry } from "./retry";
29-
30-
declare const CLI_VERSION: string;
29+
import { getCliVersion } from "./version";
3130

3231
if (process.argv.includes("--version") || process.argv.includes("-v")) {
33-
console.log(CLI_VERSION);
32+
console.log(getCliVersion());
3433
process.exit(0);
3534
}
3635

3736
if (process.argv.includes("--help") || process.argv.includes("-h")) {
38-
console.log(`Linear Release CLI v${CLI_VERSION}
37+
console.log(`Linear Release CLI v${getCliVersion()}
3938
4039
Integrate CI/CD pipelines with Linear releases.
4140
@@ -132,7 +131,7 @@ function formatLinkSummary(linksToFormat: ReleaseLink[]): string {
132131
}
133132

134133
const logEnvironmentSummary = () => {
135-
info(`linear-release v${CLI_VERSION}`);
134+
info(`linear-release v${getCliVersion()}`);
136135
if (releaseName) {
137136
info(`Using custom release name: ${releaseName}`);
138137
}

0 commit comments

Comments
 (0)