kopia lustrzana https://github.com/jupyterhub/repo2docker
handle permission issue
rodzic
1d218afd38
commit
723e5b6907
|
@ -23,11 +23,13 @@ SIGNALS = set(signal.Signals) - {signal.SIGKILL, signal.SIGSTOP, signal.SIGCHLD}
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
# open log file to send output
|
# open log file to send output; fall back to writing it in
|
||||||
log_file = open(
|
# the current working directory
|
||||||
os.path.join(os.environ.get("REPO_DIR", "."), ".jupyter-server-log.txt"),
|
if "REPO_DIR" in os.environ and os.access(os.environ["REPO_DIR"], 7):
|
||||||
"ab",
|
log_path = os.path.join(os.environ["REPO_DIR"], ".jupyter-server-log.txt")
|
||||||
)
|
else:
|
||||||
|
log_path = os.path.join(".", ".jupyter-server-log.txt")
|
||||||
|
log_file = open(log_path, "ab")
|
||||||
|
|
||||||
# build the command
|
# build the command
|
||||||
# like `exec "$@"`
|
# like `exec "$@"`
|
||||||
|
|
Ładowanie…
Reference in New Issue