Use powershell on Windows

sh can be installed and on the path if e.g. git and the unix tools are installed
Even in this case the user would probably prefer to use powershell
This commit is contained in:
Dave Hirschfeld 2018-02-27 17:14:53 +10:00 committed by GitHub
parent 2aac713937
commit ce602fcb0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,9 +14,10 @@ from .handlers import TerminalHandler, TermSocket
from . import api_handlers
def initialize(webapp, notebook_dir, connection_url, settings):
default_shell = which('sh')
if not default_shell and os.name == 'nt':
if os.name == 'nt':
default_shell = 'powershell.exe'
else:
default_shell = which('sh')
shell = settings.get('shell_command',
[os.environ.get('SHELL') or default_shell]
)