From fa5dca93d08b2be706cad9d712ad7f223c7a16c4 Mon Sep 17 00:00:00 2001 From: Mayeu Date: Sun, 6 Oct 2024 17:20:26 +0200 Subject: [PATCH] fix: nomad didn't create dir --- src/std/fwlib/blockTypes/nomad.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/std/fwlib/blockTypes/nomad.nix b/src/std/fwlib/blockTypes/nomad.nix index f945a0bc..8b09dd68 100644 --- a/src/std/fwlib/blockTypes/nomad.nix +++ b/src/std/fwlib/blockTypes/nomad.nix @@ -47,6 +47,7 @@ in declare job_path="$PRJ_DATA_HOME/${job_path}" render() { echo "Rendering to $job_path..." + mkdir -p "$PRJ_DATA_HOME/${dirOf fragmentRelPath}" rm -rf "$job_path" ln -s "${jobWithGitRevision target}" "$job_path" if status=$(nomad validate "$job_path"); then @@ -69,7 +70,7 @@ in render if ! plan_results=$(nomad plan -force-color "$job_path"); then echo "$plan_results" - run() { echo "$plan_results" | grep 'nomad job run -check-index'; } + run() { eval "$(echo "$plan_results" | grep 'nomad job run -check-index')"; } ${askUserToProceedSnippet "deploy" "run"} else echo "Job hasn't changed since last deployment, nothing to deploy"