Skip to content

Commit 8252268

Browse files
authored
Merge pull request #10 from CheckmarxDev/update-executables-rc16
updated the executables and added the permission
2 parents 8de5804 + b125b02 commit 8252268

File tree

6 files changed

+35
-4
lines changed

6 files changed

+35
-4
lines changed

package-lock.json

Lines changed: 22 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@CheckmarxDev/ast-cli-javascript-wrapper",
3-
"version": "0.0.21",
3+
"version": "0.0.22",
44
"description": "AST CLI Javascript wrapper",
55
"main": "dist/CxAuth.js",
66
"typings": "dist/CxAuth.d.ts",
@@ -51,7 +51,8 @@
5151
"ts-jest": "^26.0.0",
5252
"ts-node": "^8.10.1",
5353
"typescript": "^3.9.3",
54-
"typescript-eslint-parser": "^22.0.0"
54+
"typescript-eslint-parser": "^22.0.0",
55+
"jest-cli": "26.6.3"
5556
},
5657
"publishConfig": {
5758
"registry": "https://npm.pkg.github.com"

src/main/CxAuth.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {ExecutionService} from "./ExecutionService";
44
import {spawn} from "child_process";
55
import {CxResultType} from "./CxResultType";
66
import {CxCommandOutput} from "./CxCommandOutput";
7+
import * as fs from "fs"
78

89

910
type ParamTypeMap = Map<CxParamType, string>;
@@ -38,10 +39,18 @@ export class CxAuth {
3839
} else if (process.platform === 'darwin') {
3940
executablePath = path.join(__dirname, '/resources/cx-mac');
4041
this.pathToExecutable = executablePath;
41-
} else {
42+
fs.chmod(this.pathToExecutable, 7, function(err){
43+
console.log("Permission function output: ",err)
44+
})
45+
}
46+
else {
4247

4348
executablePath = path.join(__dirname, '/resources/cx-linux');
4449
this.pathToExecutable = executablePath;
50+
fs.chmod(this.pathToExecutable, 7, function(err){
51+
console.log("Permission function output: ",err)
52+
})
53+
4554
}
4655
if (cxScanConfig.baseUri !== null && cxScanConfig.baseUri !== '') {
4756
this.baseUri = cxScanConfig.baseUri;

src/main/resources/cx-linux

0 Bytes
Binary file not shown.

src/main/resources/cx-mac

0 Bytes
Binary file not shown.

src/main/resources/cx.exe

1.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)