mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
commit
df00f02baf
1 changed files with 3 additions and 3 deletions
|
@ -159,7 +159,7 @@ def premain(argv=None):
|
|||
parser.print_help()
|
||||
parser.exit()
|
||||
if args.version:
|
||||
version = '/'.join(('xonsh', __version__)),
|
||||
version = '/'.join(('xonsh', __version__))
|
||||
print(version)
|
||||
parser.exit()
|
||||
shell_kwargs = {'shell_type': args.shell_type,
|
||||
|
@ -224,8 +224,8 @@ def main(argv=None):
|
|||
# run a script contained in a file
|
||||
path = os.path.abspath(os.path.expanduser(args.file))
|
||||
if os.path.isfile(path):
|
||||
sys.argv = args.args
|
||||
env['ARGS'] = [args.file] + args.args
|
||||
sys.argv = [args.file] + args.args
|
||||
env['ARGS'] = sys.argv[:] # $ARGS is not sys.argv
|
||||
env['XONSH_SOURCE'] = path
|
||||
run_script_with_cache(args.file, shell.execer, glb=shell.ctx,
|
||||
loc=None, mode='exec')
|
||||
|
|
Loading…
Add table
Reference in a new issue