Set sys.argv default to [''] like Python does.

This commit is contained in:
Christian Weilbach 2013-11-30 03:00:45 +01:00
parent 63a9e35f7f
commit e65132c751

View File

@ -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 ..."