Set sys.argv default to [''] like Python does.
This commit is contained in:
parent
63a9e35f7f
commit
e65132c751
@ -228,7 +228,10 @@ def cmdline_handler(scriptname, argv):
|
||||
options = parser.parse_args(argv[1:])
|
||||
|
||||
# reset sys.argv like Python
|
||||
if options.args and len(options.args) > 0:
|
||||
sys.argv = options.args
|
||||
else: # Python default
|
||||
sys.argv = ['']
|
||||
|
||||
if options.command:
|
||||
# User did "hy -c ..."
|
||||
|
Loading…
Reference in New Issue
Block a user