Skip to content

Commit 761664e

Browse files
committed
improve shell identify on case-insensitive system
Use case-insensitive regex to remove `.exe` extension. microsoft#22036 (comment)
1 parent 78052bd commit 761664e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/common/terminal/shellDetectors/baseShellDetector.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export abstract class BaseShellDetector implements IShellDetector {
6363
export function identifyShellFromShellPath(shellPath: string): TerminalShellType {
6464
// Remove .exe extension so shells can be more consistently detected
6565
// on Windows (including Cygwin).
66-
const basePath = shellPath.replace(/\.exe$/, '');
66+
const basePath = shellPath.replace(/\.exe$/i, '');
6767

6868
const shell = Array.from(detectableShells.keys()).reduce((matchedShell, shellToDetect) => {
6969
if (matchedShell === TerminalShellType.other) {

0 commit comments

Comments
 (0)