Skip to content

Commit 802d305

Browse files
authored
Merge pull request betatim#19 from yuvipanda/patch-1
Start vscode in current directory by default
2 parents 53b509d + c6b8894 commit 802d305

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

jupyter_vscode_proxy/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ def _get_vscode_cmd(port):
77
executable = "code-server"
88
if not shutil.which(executable):
99
raise FileNotFoundError("Can not find code-server in PATH")
10-
11-
working_dir = os.getenv("CODE_WORKINGDIR", None)
12-
if working_dir is None:
13-
working_dir = os.getenv("REPO_DIR", ".")
10+
11+
# Start vscode in CODE_WORKINGDIR env variable if set
12+
# If not, start in 'current directory', which is $REPO_DIR in mybinder
13+
# but /home/jovyan (or equivalent) in JupyterHubs
14+
working_dir = os.getenv("CODE_WORKINGDIR", ".")
1415

1516
extensions_dir = os.getenv("CODE_EXTENSIONSDIR", None)
1617
extra_extensions_dir = os.getenv("CODE_EXTRA_EXTENSIONSDIR", None)

0 commit comments

Comments
 (0)