mirror of https://github.com/Hilbis/Hilbish
fix: handle syntax error in aliased command
if an alias is something which isn't valid syntax, specifically if hilbish cant split up the input properly to execute, it will report the error to the user. the previous behaviour was a panic since on error the args slice will be of length 0 this is basically an edge case and fixes a bug which shouldnt happen normallypull/143/head
parent
b0c950a96a
commit
919a52a630
6
exec.go
6
exec.go
|
@ -220,7 +220,11 @@ func execHandle(bg bool) interp.ExecHandlerFunc {
|
|||
|
||||
// If alias was found, use command alias
|
||||
argstring = aliases.Resolve(argstring)
|
||||
args, _ = shell.Fields(argstring, nil)
|
||||
var err error
|
||||
args, err = shell.Fields(argstring, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// If command is defined in Lua then run it
|
||||
|
|
Loading…
Reference in New Issue