Skip to content

Commit d8838d3

Browse files
fix: πŸ› Fix wsl external terminal
βœ… Closes: #351 #352
1 parent 5debd7b commit d8838d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

β€Žsrc/runner.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { currentShell, getPath, getRunPrefix, parseShell } from "./utils/shell-u
99
import { basename } from "path";
1010
import { externalTerminal } from "./external-terminal";
1111
import { getOutputLocation } from "./utils/file-utils";
12-
import isWsl = require("is-wsl");
12+
import isWsl from "is-wsl";
1313

1414
export class Runner {
1515
private file: File;
@@ -42,7 +42,7 @@ export class Runner {
4242

4343
const runCommand = this.getRunCommand(parsedExecutable, args, customPrefix, shell);
4444

45-
if (shouldRunInExternalTerminal === true && Boolean(isWsl) === true){
45+
if (shouldRunInExternalTerminal === true && isWsl === true){
4646
Notification.showWarningMessage("Wsl detected, running in vscode terminal!");
4747

4848
shouldRunInExternalTerminal = false;

β€Žsrc/utils/common-utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import find = require("find-process");
22
import { lookpath } from "lookpath";
33
import { isStringNullOrWhiteSpace } from "./string-utils";
4-
import isWsl = require("is-wsl");
4+
import isWsl from "is-wsl";
55

66
export async function commandExists(command: string): Promise<boolean> {
77
const result = await lookpath(command);
@@ -15,7 +15,7 @@ export async function isProccessRunning(proccess: string): Promise<boolean> {
1515
}
1616

1717
// Temporary workaround for wsl
18-
if (Boolean(isWsl) === true) {
18+
if (isWsl === true) {
1919
return false;
2020
}
2121

0 commit comments

Comments
Β (0)