prompt: remove newline heuristic from exec prompt
All array entries in prompt config are now shell commands. Removes the special case that treated entries with newlines as literal text.
This commit is contained in:
parent
f9b2b50274
commit
a9c7600d6e
|
|
@ -41,11 +41,6 @@ func resolveExecPrompt(cmds []string, cwd string) (string, error) {
|
|||
if cmdStr == "" {
|
||||
continue
|
||||
}
|
||||
// Entries containing a newline are literal text, not commands.
|
||||
if strings.Contains(cmdStr, "\n") {
|
||||
parts = append(parts, cmdStr)
|
||||
continue
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
cmd := exec.CommandContext(ctx, "sh", "-c", cmdStr)
|
||||
if cwd != "" {
|
||||
|
|
|
|||
Reference in New Issue