From b78771f4b2ab64e6815c7fdf10422a5f260846d2 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 24 Oct 2022 16:48:47 -0400 Subject: [PATCH] Temp fix Signed-off-by: Sebastian Malton --- .../shell-env/compute-unix-shell-environment.injectable.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/utils/shell-env/compute-unix-shell-environment.injectable.ts b/src/main/utils/shell-env/compute-unix-shell-environment.injectable.ts index 668fa95aea..b3d3d4abb5 100644 --- a/src/main/utils/shell-env/compute-unix-shell-environment.injectable.ts +++ b/src/main/utils/shell-env/compute-unix-shell-environment.injectable.ts @@ -4,9 +4,9 @@ */ import type { EnvironmentVariables } from "./compute-shell-environment.injectable"; import { getInjectable } from "@ogre-tools/injectable"; -import getBasenameOfPathInjectable from "../../../common/path/get-basename.injectable"; import spawnInjectable from "../../child-process/spawn.injectable"; import randomUUIDInjectable from "../../crypto/random-uuid.injectable"; +import { basename } from "path"; export interface UnixShellEnvOptions { signal?: AbortSignal; @@ -20,12 +20,11 @@ const computeUnixShellEnvironmentInjectable = getInjectable({ const powerShellName = /^pwsh(-preview)?$/; const nonBashLikeShellName = /^t?csh$/; - const getBasenameOfPath = di.inject(getBasenameOfPathInjectable); const spawn = di.inject(spawnInjectable); const randomUUID = di.inject(randomUUIDInjectable); const getShellSpecifices = (shellPath: string, mark: string) => { - const shellName = getBasenameOfPath(shellPath); + const shellName = basename(shellPath); if (powerShellName.test(shellName)) { // Older versions of PowerShell removes double quotes sometimes so we use "double single quotes" which is how