Skip to content

Commit

Permalink
Fix error: `failed to create directory via template '/tmp/nix-shell.X…
Browse files Browse the repository at this point in the history
…XXXXX/'` (#157)

mktemp: failed to create directory via template '/tmp/nix-shell.xsPtzA/nix-shell.XXXXXX': No such file or directory
  • Loading branch information
yvan-sraka authored Jun 19, 2024
1 parent 6ee20d6 commit 54ea656
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ RUN DEBIAN_FRONTEND=noninteractive \
&& ./fetch-docker.sh input-output-hk/devx $PLATFORM.$COMPILER_NIX_NAME$TARGET_PLATFORM$VARIANT$IOG-env | zstd -d | nix-store --import | tee store-paths.txt

RUN cat <<EOF >> $HOME/.bashrc
# This fix: mktemp: failed to create directory via template '/tmp/nix-shell.XXXXXX/' ...
if [ -n "\$VSCODE_GIT_IPC_HANDLE" ]; then
mkdir -p "\$(dirname "\$VSCODE_GIT_IPC_HANDLE")"
fi
if [ -n "\$VSCODE_IPC_HOOK_CLI" ]; then
mkdir -p "\$(dirname "\$VSCODE_IPC_HOOK_CLI")"
fi
# This line is the one that actually brings DevX devshell ...
source $(grep -m 1 -e '-env.sh$' store-paths.txt)
EOF

Expand Down

0 comments on commit 54ea656

Please sign in to comment.