fix write_config to properly error for mismatched config files
This commit is contained in:
parent
71d4f2c4be
commit
a1469f1185
2
setup.sh
2
setup.sh
|
@ -107,7 +107,7 @@ function write_config()
|
|||
env "${new_vars[@]}" envsubst "$vars" < "$src" > "$temp" || { rm -f "$temp"; exit 1; }
|
||||
chmod "$mode" "$temp" || { rm -f "$temp"; exit 1; }
|
||||
chown "$owner" "$temp" || { rm -f "$temp"; exit 1; }
|
||||
if mv -n -T "$temp" "$dest"; then
|
||||
if [[ ! -f "$dest" ]] && mv -v -T "$temp" "$dest"; then
|
||||
return 0
|
||||
fi
|
||||
if diff -u --label="expanded $src" "$temp" "$dest"; then
|
||||
|
|
Loading…
Reference in a new issue