summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-04-13 15:39:40 +0200
committerlassulus <lassulus@lassul.us>2019-04-13 15:39:40 +0200
commit7f9b2c6f45ce0ca09c0fe8ba07fab16bf4428f38 (patch)
tree10a562fb47a0fea88c71d585338f3b8e4cd8fb0a
parent3ccac0c30e77501d40c2fc29122e59fe87bd60fa (diff)
ci: create gcroot only if result exists
-rw-r--r--krebs/3modules/ci.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/krebs/3modules/ci.nix b/krebs/3modules/ci.nix
index a47dbe611..244de1a0d 100644
--- a/krebs/3modules/ci.nix
+++ b/krebs/3modules/ci.nix
@@ -108,10 +108,12 @@ let
name=str(new_step),
command=[
"${pkgs.writeDash "build-stepper.sh" ''
- set -efu
+ set -xefu
profile=${shell.escape profileRoot}/$build_name
result=$("$build_script")
- ${pkgs.nix}/bin/nix-env -p "$profile" --set "$result"
+ if [ -n "$result" ]; then
+ ${pkgs.nix}/bin/nix-env -p "$profile" --set "$result"
+ fi
''}"
],
env={