mirror of
https://github.com/wahyd4/forego.git
synced 2026-08-09 05:07:05 +10:00
use exec to prevent spawn unneeded subprocess
This commit is contained in:
committed by
David Dollar
parent
d7a88f3b3a
commit
5d3c4e433e
@@ -16,7 +16,7 @@ func ShellInvocationCommand(interactive bool, root, command string) []string {
|
||||
shellArgument = "-ic"
|
||||
}
|
||||
profile := filepath.Join(root, ".profile")
|
||||
shellCommand := fmt.Sprintf("source \"%s\" 2>/dev/null; %s", profile, command)
|
||||
shellCommand := fmt.Sprintf("source \"%s\" 2>/dev/null; exec %s", profile, command)
|
||||
return []string{"bash", shellArgument, shellCommand}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user