2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-02 19:53:23 +00:00

fix: tryrun input from -c only if its provided

This commit is contained in:
sammyette 2021-05-16 08:42:20 -04:00
parent 83bcb35dcf
commit 83591f9bba
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5

View File

@ -116,7 +116,10 @@ func main() {
readline.Completer = readline.FilenameCompleter
readline.LoadHistory(homedir + "/.hilbish-history")
RunInput(*cmdflag)
if *cmdflag != "" {
RunInput(*cmdflag)
}
if getopt.NArgs() > 0 {
l.SetGlobal("args", luar.New(l, getopt.Args()))
err := l.DoFile(getopt.Arg(0))