diff options
author | zimbatm <zimbatm@zimbatm.com> | 2016-03-18 19:47:19 +0000 |
---|---|---|
committer | zimbatm <zimbatm@zimbatm.com> | 2016-03-23 11:22:51 +0000 |
commit | 40e9dff04a4a61b6fde13d3fc32ddd46f1ad3d7e (patch) | |
tree | 6d5e5e710076fde63186d456cf3dd0a7c934b4b0 /pkgs/build-support/fetchgit | |
parent | 89fd50144182633ecb42a60d21523896f1bd9acc (diff) |
nix-prefetch-git: fix url_to_name heuristic
The function wasn't checking that *all* of the characters where [a-z0-9]. Fixes #13921
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rwxr-xr-x | pkgs/build-support/fetchgit/nix-prefetch-git | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 2af01ee5373bf..9352757ea806e 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -118,7 +118,7 @@ url_to_name(){ # basename removes the / and .git suffixes local base=$(basename "$url" .git) - if [[ $ref =~ [a-z0-9]+ ]]; then + if [[ $ref =~ ^[a-z0-9]+$ ]]; then echo "$base-${ref:0:7}" else echo $base |