Skip to content

Commit

Permalink
Merge pull request betatim#19 from yuvipanda/patch-1
Browse files Browse the repository at this point in the history
Start vscode in current directory by default
  • Loading branch information
betatim authored Jun 10, 2020
2 parents 53b509d + c6b8894 commit 802d305
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jupyter_vscode_proxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ def _get_vscode_cmd(port):
executable = "code-server"
if not shutil.which(executable):
raise FileNotFoundError("Can not find code-server in PATH")

working_dir = os.getenv("CODE_WORKINGDIR", None)
if working_dir is None:
working_dir = os.getenv("REPO_DIR", ".")

# Start vscode in CODE_WORKINGDIR env variable if set
# If not, start in 'current directory', which is $REPO_DIR in mybinder
# but /home/jovyan (or equivalent) in JupyterHubs
working_dir = os.getenv("CODE_WORKINGDIR", ".")

extensions_dir = os.getenv("CODE_EXTENSIONSDIR", None)
extra_extensions_dir = os.getenv("CODE_EXTRA_EXTENSIONSDIR", None)
Expand Down

0 comments on commit 802d305

Please sign in to comment.