Merge pull request #2285 from xonsh/shellname

Ensure shell names are lower case
This commit is contained in:
Anthony Scopatz 2017-03-01 22:23:39 -05:00 committed by GitHub
commit 5466f4e7b5
2 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,14 @@
**Added:** None
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:**
* Fixed a bug if foreign_shell name was not written in lower case in
the static configuration file ``config.json``
**Security:** None

View file

@ -490,7 +490,7 @@ def ensure_shell(shell):
if not (shell_keys <= VALID_SHELL_PARAMS): if not (shell_keys <= VALID_SHELL_PARAMS):
msg = 'unknown shell keys: {0}' msg = 'unknown shell keys: {0}'
raise KeyError(msg.format(shell_keys - VALID_SHELL_PARAMS)) raise KeyError(msg.format(shell_keys - VALID_SHELL_PARAMS))
shell['shell'] = ensure_string(shell['shell']) shell['shell'] = ensure_string(shell['shell']).lower()
if 'interactive' in shell_keys: if 'interactive' in shell_keys:
shell['interactive'] = to_bool(shell['interactive']) shell['interactive'] = to_bool(shell['interactive'])
if 'login' in shell_keys: if 'login' in shell_keys: