From 54ea65610338600bd4c4afd04b0b6ff612988fd4 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Wed, 19 Jun 2024 12:48:32 +0200 Subject: [PATCH] Fix error: `failed to create directory via template '/tmp/nix-shell.XXXXXX/'` (#157) mktemp: failed to create directory via template '/tmp/nix-shell.xsPtzA/nix-shell.XXXXXX': No such file or directory --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index cb8ba68..390de64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 <> $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