Skip to content

Commit b10f397

Browse files
committed
feat: use --insecure instead of --allow-self-signed
1 parent f2801b6 commit b10f397

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/lib/run-ggshield.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ export function runGGShieldCommand(
3737
if (workspace.workspaceFolders?.length || 0 > 0) {
3838
options["cwd"] = workspace.workspaceFolders![0].uri.fsPath;
3939
}
40-
// if insecure is enabled, add the --allow-self-signed flag
4140
if (configuration.insecure) {
42-
args = ["--allow-self-signed"].concat(args);
41+
args = ["--insecure"].concat(args);
4342
}
4443

4544
if (configuration.apiUrl && !args.includes("--version")) {

src/test/suite/lib/run-ggshield.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ suite("runGGShieldCommand", () => {
4040
{
4141
insecure: true,
4242
description:
43-
"GGshield is called with flag --allow-self-signed when insecure is true",
43+
"GGshield is called with flag --insecure when insecure is true",
4444
},
4545
{
4646
insecure: false,
4747
description:
48-
"GGshield is not called with flag --allow-self-signed when insecure is false",
48+
"GGshield is not called with flag --insecure when insecure is false",
4949
},
5050
];
5151

@@ -67,7 +67,7 @@ suite("runGGShieldCommand", () => {
6767
const spawnSyncArgs = spawnSyncMock.lastCall.args;
6868
const args = spawnSyncArgs[1];
6969

70-
assert.strictEqual(args[0] === "--allow-self-signed", insecure);
70+
assert.strictEqual(args[0] === "--insecure", insecure);
7171
});
7272
});
7373

0 commit comments

Comments
 (0)