Skip to content

Commit 3e0ea1b

Browse files
authored
Merge pull request github#997 from github/aeisenberg/cli-version-test
Avoid testing for the correct CLI_VERSION if CLI_PATH is set
2 parents 6215c27 + ce1ebd2 commit 3e0ea1b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

extensions/ql-vscode/src/vscode-tests/cli-integration/run-cli.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('Use cli', function() {
2929
}
3030
});
3131

32-
if (process.env.CLI_VERSION !== 'nightly') {
32+
if (process.env.CLI_VERSION && process.env.CLI_VERSION !== 'nightly') {
3333
it('should have the correct version of the cli', async () => {
3434
expect(
3535
(await cli.getVersion()).toString()

extensions/ql-vscode/src/vscode-tests/ensureCli.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export async function ensureCli(useCli: boolean) {
6161
if ('CLI_PATH' in process.env) {
6262
const executablePath = process.env.CLI_PATH;
6363
console.log(`Using existing CLI at ${executablePath}`);
64+
65+
// The CLI_VERSION env variable is not used when the CLI_PATH is set.
66+
delete process.env.CLI_VERSION;
6467
return;
6568
}
6669

0 commit comments

Comments
 (0)