mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
some xexec optimizations
This commit is contained in:
parent
60aafcfb16
commit
85f37ecaa9
1 changed files with 1 additions and 2 deletions
|
@ -282,9 +282,8 @@ def xexec(args, stdin=None):
|
|||
"""Replaces current process with command specified and passes in the
|
||||
current xonsh environment.
|
||||
"""
|
||||
env = builtins.__xonsh_env__
|
||||
denv = env.detype()
|
||||
if len(args) > 0:
|
||||
denv = builtins.__xonsh_env__.detype()
|
||||
try:
|
||||
os.execvpe(args[0], args, denv)
|
||||
except FileNotFoundError as e:
|
||||
|
|
Loading…
Add table
Reference in a new issue