Skip to content

Commit

Permalink
fix: check lfs setting as a string (#243)
Browse files Browse the repository at this point in the history
closes #227
  • Loading branch information
lorenzo-cavazzi authored Feb 11, 2020
1 parent 74ebd57 commit 612543a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions git-clone/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
# the proper file permissions.
set -x

if [ "$LFS_AUTO_FETCH" = 1 ]; then LFS_SKIP_SMUDGE="";
else LFS_SKIP_SMUDGE="--skip-smudge";
if [ "$LFS_AUTO_FETCH" = 1 ]; then
LFS_SKIP_SMUDGE="";
else
LFS_SKIP_SMUDGE="--skip-smudge";
fi

rm -rf ${MOUNT_PATH}/*
(rm -rf ${MOUNT_PATH}/.* || true)
git config push.default simple
git config --system push.default simple
git lfs install $LFS_SKIP_SMUDGE --system
git clone $REPOSITORY ${MOUNT_PATH}
git lfs install $LFS_SKIP_SMUDGE --local
Expand Down
4 changes: 2 additions & 2 deletions jupyterhub/spawners.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ def get_pod_manifest(self):
for container in self.init_containers
if not container.name.startswith(init_container_name)
]
lfs_auto_fetch = server_options.get("lfs_auto_fetch")
init_container = client.V1Container(
name=init_container_name,
env=[
client.V1EnvVar(name="MOUNT_PATH", value=mount_path),
client.V1EnvVar(name="REPOSITORY", value=repository),
client.V1EnvVar(
name="LFS_AUTO_FETCH",
value=str(server_options.get("lfs_auto_fetch")),
name="LFS_AUTO_FETCH", value="1" if lfs_auto_fetch else "0",
),
client.V1EnvVar(
name="COMMIT_SHA", value=str(options.get("commit_sha"))
Expand Down

0 comments on commit 612543a

Please sign in to comment.