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.
2 parents c4e01b3 + 3ee04e3 commit e7524a7Copy full SHA for e7524a7
repo2docker/buildpacks/repo2docker-entrypoint
@@ -30,17 +30,21 @@ def main():
30
# 2. current working directory: "."
31
# 3. default temp directory for the OS (e.g. /tmp for linux)
32
log_dirs = [".", tempfile.gettempdir()]
33
+ log_file = None
34
if "REPO_DIR" in os.environ:
35
log_dirs.insert(0, os.environ["REPO_DIR"])
36
for d in log_dirs:
37
log_path = os.path.join(d, ".jupyter-server-log.txt")
38
try:
39
log_file = open(log_path, "ab")
- except PermissionError:
40
+ except Exception:
41
continue
42
else:
43
# success
44
break
45
+ # raise Exception if log_file could not be set
46
+ if log_file is None:
47
+ raise Exception("Could not open '.jupyter-server-log.txt' log file " )
48
49
# build the command
50
# like `exec "$@"`
0 commit comments