Skip to content

Commit 66f1347

Browse files
committed
Check setting in handleMissingSwiftly
1 parent a2fa7a0 commit 66f1347

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/commands/installSwiftly.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import * as path from "path";
1515
import * as vscode from "vscode";
1616

17+
import configuration from "../configuration";
1718
import { SwiftLogger } from "../logging/SwiftLogger";
1819
import { Swiftly } from "../toolchain/swiftly";
1920
import { Workbench } from "../utilities/commands";
@@ -124,6 +125,11 @@ export async function handleMissingSwiftly(
124125
extensionRoot: string,
125126
logger?: SwiftLogger
126127
): Promise<boolean> {
128+
if (configuration.folder(undefined).disableSwiftlyInstallPrompt) {
129+
logger?.debug("Swiftly installation prompt is suppressed");
130+
return false;
131+
}
132+
127133
// Prompt user for installation
128134
if (!(await promptForSwiftlyInstallation(logger))) {
129135
return false;

test/unit-tests/toolchain/swiftly.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,6 @@ apt-get -y install libncurses5-dev
16191619
const result = await handleMissingSwiftly([], "");
16201620

16211621
expect(result).to.be.false;
1622-
console.log(">>> PROMPT RETURN ARGS", mockWindow.showWarningMessage.args);
16231622
expect(mockWindow.showWarningMessage).to.not.have.been.called;
16241623
});
16251624

0 commit comments

Comments
 (0)