Commit 977753c5 authored by Pasha Fistanto's avatar Pasha Fistanto Committed by Doron Behar
Browse files

nixos/syncthing: fix folder & device deletion override if IDs contain white-spaces

this should fix nixosTests.syncthing-many-devices
parent b627fac8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -286,11 +286,11 @@ let
              stale_${conf_type}_ids="$(curl -X GET ${s.baseAddress} | ${jq} \
                --argjson new_ids ${lib.escapeShellArg (builtins.toJSON s.new_conf_IDs)} \
                --raw-output \
                '[.[].${s.GET_IdAttrName}] - $new_ids | .[]'
                '[.[].${s.GET_IdAttrName}] - $new_ids | .[]|@uri'
              )"
              for id in ''${stale_${conf_type}_ids}; do
                >&2 echo "Deleting stale device: $id"
                curl -X DELETE ${s.baseAddress}/$id
                curl -X DELETE "${s.baseAddress}/$id"
              done
            ''
          ))