mirror of https://github.com/Hilbis/Hilbish
fix: dont prompt for continued input on incomplete input when not interactive (closes #137)
parent
2814f44163
commit
f002eca258
3
exec.go
3
exec.go
|
@ -125,6 +125,9 @@ func handleSh(cmdString string) (uint8, error) {
|
|||
if err != nil {
|
||||
// If input is incomplete, start multiline prompting
|
||||
if syntax.IsIncomplete(err) {
|
||||
if !interactive {
|
||||
return 126, err
|
||||
}
|
||||
for {
|
||||
cmdString, err = continuePrompt(strings.TrimSuffix(cmdString, "\\"))
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue