diff options
author | Yaya <mak@nyantec.com> | 2023-01-03 13:49:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-03 13:49:07 +0100 |
commit | 5e96eb14ce38fe9067fe5d8545379560a0c331c4 (patch) | |
tree | 25ba64fe72ef023cd3204e8d9b90e6428663f675 /nixos/modules/services | |
parent | f61d4d346bcacb4967a4f259280682279e9db7c5 (diff) |
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
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/web-apps/snipe-it.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/services/web-apps/snipe-it.nix b/nixos/modules/services/web-apps/snipe-it.nix index 314a69a73a872..93b0aafab64bf 100644 --- a/nixos/modules/services/web-apps/snipe-it.nix +++ b/nixos/modules/services/web-apps/snipe-it.nix @@ -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 ''; }; |