1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-18 12:38:30 +02:00

home-manager: use strict Bash evaluation

In particular, this will ensure that the whole script fails with an
error code if the activation script fails during a switch. Fixes #10.
This commit is contained in:
Robert Helgesson 2017-05-14 14:02:15 +02:00
parent a9da4575f5
commit 870d1d484d
No known key found for this signature in database
GPG Key ID: C3DB11069E65DC86

View File

@ -1,5 +1,7 @@
#!@bash@/bin/bash
set -euo pipefail
function doBuild() {
if [[ -z "$1" ]]; then
echo "Need to provide path to configuration file."
@ -35,6 +37,7 @@ function doBuild() {
fi
local extraArgs
extraArgs=""
for p in "${EXTRA_NIX_PATH[@]}"; do
extraArgs="$extraArgs -I $p"