forked from mirrors/nixpkgs
nixos/snipe-it: Fix a bug in the setup script (#206869)
The `snipe-it-setup.service` script exits with an error if the invalid_barcode.gif already exists at the destination, due to `set -euo pipefail` at the beginning of the script. This commit refactors the affected lines so that it no longer causes an error. Resolves #205791
This commit is contained in:
parent
f61d4d346b
commit
5e96eb14ce
|
@ -454,8 +454,9 @@ in {
|
|||
|
||||
# A placeholder file for invalid barcodes
|
||||
invalid_barcode_location="${cfg.dataDir}/public/uploads/barcodes/invalid_barcode.gif"
|
||||
[ ! -e "$invalid_barcode_location" ] \
|
||||
&& cp ${snipe-it}/share/snipe-it/invalid_barcode.gif "$invalid_barcode_location"
|
||||
if [ ! -e "$invalid_barcode_location" ]; then
|
||||
cp ${snipe-it}/share/snipe-it/invalid_barcode.gif "$invalid_barcode_location"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue