Skip to content

Commit

Permalink
fix: πŸ› Fix wsl external terminal
Browse files Browse the repository at this point in the history
βœ… Closes: #351 #352
  • Loading branch information
danielpinto8zz6 committed Feb 4, 2024
1 parent 5debd7b commit d8838d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { currentShell, getPath, getRunPrefix, parseShell } from "./utils/shell-u
import { basename } from "path";
import { externalTerminal } from "./external-terminal";
import { getOutputLocation } from "./utils/file-utils";
import isWsl = require("is-wsl");
import isWsl from "is-wsl";

export class Runner {
private file: File;
Expand Down Expand Up @@ -42,7 +42,7 @@ export class Runner {

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

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

shouldRunInExternalTerminal = false;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/common-utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import find = require("find-process");
import { lookpath } from "lookpath";
import { isStringNullOrWhiteSpace } from "./string-utils";
import isWsl = require("is-wsl");
import isWsl from "is-wsl";

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

// Temporary workaround for wsl
if (Boolean(isWsl) === true) {
if (isWsl === true) {
return false;
}

Expand Down

0 comments on commit d8838d3

Please sign in to comment.