Skip to content

Commit 37d6728

Browse files
committed
add getVersionFilePath
1 parent b0cdfa2 commit 37d6728

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/osinstaller/CxInstaller.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export class CxInstaller {
112112
return this.cliVersion;
113113
}
114114
try {
115-
const versionFilePath = path.join('checkmarx-ast-cli.version');
115+
const versionFilePath = this.getVersionFilePath();
116116
const versionContent = await fsPromises.readFile(versionFilePath, 'utf-8');
117117
return versionContent.trim();
118118
} catch (error) {
@@ -121,6 +121,10 @@ export class CxInstaller {
121121
}
122122
}
123123

124+
private getVersionFilePath(): string {
125+
return path.join(__dirname,'../../../checkmarx-ast-cli.version');
126+
}
127+
124128
private getCompressFolderName(): string {
125129
return `ast-cli.${this.platform === 'win32' ? 'zip' : 'tar.gz'}`;
126130
}

0 commit comments

Comments
 (0)