We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1e9a27 commit cf844beCopy full SHA for cf844be
jupyter_rsession_proxy/__init__.py
@@ -58,11 +58,22 @@ def _get_rsession_env(port):
58
}
59
60
def _get_rsession_cmd(port):
61
+ # Other paths rsession maybe in
62
+ other_paths = [
63
+ # When rstudio-server deb is installed
64
+ '/usr/lib/rstudio-server/bin/rsession',
65
+ # When just rstudio deb is installed
66
+ '/usr/lib/rstudio/bin/rsession',
67
+ ]
68
if shutil.which('rsession'):
69
executable = 'rsession'
70
else:
- # Default path for rsession if installed with the deb package
- executable = '/usr/lib/rstudio-server/bin/rsession'
71
+ for op in other_paths:
72
+ if os.path.exists(op):
73
+ executable = op
74
+ break
75
+ else:
76
+ raise FileNotFoundError('Can not find rsession in PATH')
77
78
return [
79
executable,
0 commit comments