mirror of
https://github.com/nix-community/home-manager
synced 2024-12-03 16:39:46 +01: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:
parent
a9da4575f5
commit
870d1d484d
1 changed files with 3 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue