mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-11 17:50:08 +01:00
fix(sandbox_helper): fix TMPDIR being initialized too late and thus removing /tmp
This commit is contained in:
parent
4d824900d4
commit
cf04bf5357
1 changed files with 1 additions and 1 deletions
|
|
@ -35,6 +35,7 @@ done
|
|||
|
||||
if [ "$NO_SANDBOX" = false ]; then
|
||||
echo "Running with simple sandboxing"
|
||||
TMPDIR=$(mktemp -dt "nix-gitlab-ci.XXX")
|
||||
if [ "$KEEP_TMP" = false ]; then
|
||||
trap "rm -rf '$TMPDIR'" EXIT
|
||||
else
|
||||
|
|
@ -49,7 +50,6 @@ if [ "$NO_SANDBOX" = false ]; then
|
|||
git diff --staged > "$DIRTY_PATCH"
|
||||
trap "rm -f '$DIRTY_PATCH'" EXIT
|
||||
fi
|
||||
TMPDIR=$(mktemp -dt "nix-gitlab-ci.XXX")
|
||||
git clone . $TMPDIR
|
||||
pushd $TMPDIR >/dev/null
|
||||
if [[ ! -z "$DIRTY_PATCH" && "$INCLUDE_DIRTY" = true ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue