mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Reset $XONSH_COLOR_STYLE on bad value
Without doing this, an error message is printed on every iteration of the command loop. Perhaps it might be better to reset to the previous value if it exists, else 'default'?
This commit is contained in:
parent
2a2669c955
commit
370bf5668c
1 changed files with 1 additions and 0 deletions
|
@ -321,6 +321,7 @@ class XonshStyle(Style):
|
|||
warn('Could not find style {0!r}, using default'.format(value),
|
||||
RuntimeWarning)
|
||||
value = 'default'
|
||||
builtins.__xonsh_env__['XONSH_COLOR_STYLE'] = value
|
||||
cmap = STYLES[value]
|
||||
try:
|
||||
self._smap = get_style_by_name(value)().styles.copy()
|
||||
|
|
Loading…
Add table
Reference in a new issue