Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Don't fail Datalab startup if docs cloning fails #1031

Merged
merged 1 commit into from
Oct 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions containers/datalab/content/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ fi

mkdir -p /content/datalab/notebooks

# Fetch docs and tutorials. This should not abort startup if it fails
{
if [ -d /content/datalab/docs ]; then
# The docs directory already exists, so we have to either update or initialize it as a git repository
pushd ./
Expand All @@ -178,6 +180,7 @@ else
(cd /content/datalab; git clone -n --single-branch https://github.com/googledatalab/notebooks.git docs)
fi
(cd /content/datalab/docs; git config core.sparsecheckout true; echo $'intro/\nsamples/\ntutorials/\n*.ipynb\n' > .git/info/sparse-checkout; git checkout master)
} || echo "Fetching tutorials and samples failed."

# Run the user's custom extension script if it exists. To avoid platform issues with
# execution permissions, line endings, etc, we create a local sanitized copy.
Expand Down