mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
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:
parent
2aac713937
commit
ce602fcb0d
@ -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]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user