Skip to content

Commit 97bff26

Browse files
committed
Fix Bash Argument Ordering
1 parent 9e0ffc8 commit 97bff26

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

CodeEdit/Features/TerminalEmulator/Model/ShellIntegration.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ enum ShellIntegration {
6565
// Enable injection in our scripts.
6666
environment.append("\(Variables.ceInjection)=1")
6767

68-
if let execArgs = shell.execArguments(interactive: interactive, login: useLogin) {
69-
args.append(execArgs)
70-
}
71-
7268
switch shell {
7369
case .bash:
7470
try bash(&args)
7571
case .zsh:
76-
try zsh(&args, &environment)
72+
try zsh(&environment)
7773
}
7874

7975
if useLogin {
8076
environment.append("\(Variables.shellLogin)=1")
8177
}
8278

79+
if let execArgs = shell.execArguments(interactive: interactive, login: useLogin) {
80+
args.append(execArgs)
81+
}
82+
8383
return args
8484
} catch {
8585
// catch so we can log this here
@@ -125,7 +125,6 @@ enum ShellIntegration {
125125
/// - useLogin: Whether to use a login shell.
126126
/// - interactive: Whether to use an interactive shell.
127127
private static func zsh(
128-
_ args: inout [String],
129128
_ environment: inout [String]
130129
) throws {
131130
// All injection script URLs

0 commit comments

Comments
 (0)