mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
Propagate SyntaxError message in exec-ing .xonshrc to the user
This commit is contained in:
parent
f5c810fe9b
commit
3859096681
1 changed files with 2 additions and 2 deletions
|
@ -138,8 +138,8 @@ def xonshrc_context(rcfile=None, execer=None):
|
|||
try:
|
||||
execer.filename = rcfile
|
||||
execer.exec(rc, glbs={}, locs=env)
|
||||
except SyntaxError:
|
||||
warn('syntax error in xonsh run control file {0!r}'.format(rcfile),
|
||||
except SyntaxError as err:
|
||||
warn('syntax error in xonsh run control file {0!r}: {1!s}'.format(rcfile, err),
|
||||
RuntimeWarning)
|
||||
finally:
|
||||
execer.filename = fname
|
||||
|
|
Loading…
Add table
Reference in a new issue