From 5c4bd3db52b927f9a4ccd8cb4f1fe7c7d7a8f374 Mon Sep 17 00:00:00 2001 From: Seth Flynn Date: Sun, 30 Mar 2025 17:19:20 -0400 Subject: [PATCH] fix(nix): only create compile_commands.json if it doesn't exist Signed-off-by: Seth Flynn (cherry picked from commit 58579539d071c569800ba0370a6d5918de025e33) --- flake.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index ea14f9048..ceb4bad4b 100644 --- a/flake.nix +++ b/flake.nix @@ -105,8 +105,10 @@ ]; shellHook = '' - cmake $cmakeFlags -D CMAKE_BUILD_TYPE=Debug - ln -s {build/,}compile_commands.json + if [ ! -f compile_commands.json ]; then + cmake $cmakeFlags -D CMAKE_BUILD_TYPE=Debug + ln -s {build/,}compile_commands.json + fi ''; }; }