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

Commit 88553f1

Browse files
authored
Don't fail Datalab startup if docs cloning fails (#1031)
1 parent c141f0f commit 88553f1

File tree

1 file changed

+3
-0
lines changed
  • containers/datalab/content

1 file changed

+3
-0
lines changed

containers/datalab/content/run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ fi
164164

165165
mkdir -p /content/datalab/notebooks
166166

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

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

0 commit comments

Comments
 (0)