diff options
author | Manuel Mendez <mmendez534@gmail.com> | 2022-04-03 22:29:02 -0400 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-04-04 13:37:08 +1000 |
commit | 60543c4f9ee05091a0b7aab3620adbc3eeef4b2c (patch) | |
tree | 9df85d75d5bf71e4fbc3834f21159cc51f1fb499 /pkgs/development/go-modules | |
parent | bb7e4b378eef257335d91ae507d5123c4c770497 (diff) | |
download | nixpkgs-60543c4f9ee05091a0b7aab3620adbc3eeef4b2c.tar nixpkgs-60543c4f9ee05091a0b7aab3620adbc3eeef4b2c.tar.gz nixpkgs-60543c4f9ee05091a0b7aab3620adbc3eeef4b2c.tar.bz2 nixpkgs-60543c4f9ee05091a0b7aab3620adbc3eeef4b2c.tar.lz nixpkgs-60543c4f9ee05091a0b7aab3620adbc3eeef4b2c.tar.xz nixpkgs-60543c4f9ee05091a0b7aab3620adbc3eeef4b2c.tar.zst nixpkgs-60543c4f9ee05091a0b7aab3620adbc3eeef4b2c.zip |
go: Drop unnecessary backslash-escape
There's no backslash interpretation going on within single-quote strings which means there's no need to escape the backslash. Since this was going on within single-quote strings the $exclude variable ended up having 2 backslashes (`\\`) instead of the intended single backslash. This meant that the regex that was built up was incorrect. For example prometheus' exclude contents before and after this change are: ✕: \(/_\|examples\|Godeps\|testdata\\|documentation/prometheus-mixin\) ✓: \(/_\|examples\|Godeps\|testdata\|documentation/prometheus-mixin\)
Diffstat (limited to 'pkgs/development/go-modules')
-rw-r--r-- | pkgs/development/go-modules/generic/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index f986d164ee8..e2428edbb26 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -176,7 +176,7 @@ let IFS=' ' read -r -a excludedArr <<<$excludedPackages printf -v excludedAlternates '%s\\|' "''${excludedArr[@]}" excludedAlternates=''${excludedAlternates%\\|} # drop final \| added by printf - exclude+='\\|'"$excludedAlternates" + exclude+='\|'"$excludedAlternates" fi exclude+='\)' |