Skip to content

Commit 2e3b4eb

Browse files
authored
Merge pull request #21 from CheckmarxDev/fix/benalvo/get-version-file-path
add getVersionFilePath
2 parents e2faa28 + 0412265 commit 2e3b4eb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli",
3-
"version": "1.0.1",
3+
"version": "1.0.0",
44
"description": "AST CLI Javascript wrapper runtime CLI",
55
"main": "dist/main/wrapper/CxWrapper.js",
66
"typings": "dist/main/wrapper/CxWrapper.d.ts",

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)