fix: yaegi os.Args should contain the script name

This commit is contained in:
Nicholas Wiersma
2020-09-28 10:54:05 +02:00
committed by GitHub
parent 5dfc3b86dc
commit f36d4e01eb

View File

@@ -70,7 +70,7 @@ func run(arg []string) error {
// Skip first os arg to set command line as expected by interpreted main
path := args[0]
os.Args = arg[1:]
os.Args = arg
flag.CommandLine = flag.NewFlagSet(path, flag.ExitOnError)
if isFile(path) {