mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-05-02 10:37:03 +00:00
nix-prefetch-git: fix handling of submodules with spaces
The script would parse the output of `git submodule status` but didn't handle paths with spaces in them. This would result in the following error when trying to determine the URL of the submodule: error: key does not contain a section: .url
This commit is contained in:
parent
cc8c33e159
commit
9fe26eed9e
1 changed files with 1 additions and 1 deletions
|
@ -185,7 +185,7 @@ init_submodules(){
|
||||||
|
|
||||||
# checkout each submodule
|
# checkout each submodule
|
||||||
hash=$(echo "$l" | awk '{print $1}' | tr -d '-')
|
hash=$(echo "$l" | awk '{print $1}' | tr -d '-')
|
||||||
dir=$(echo "$l" | awk '{print $2}')
|
dir=$(echo "$l" | sed -n 's/^ \{0,1\}[^ ]* \(.*\) ([^ ]*)$/\1/p')
|
||||||
name=$(
|
name=$(
|
||||||
git config -f .gitmodules --get-regexp submodule\..*\.path |
|
git config -f .gitmodules --get-regexp submodule\..*\.path |
|
||||||
sed -n "s,^\(.*\)\.path $dir\$,\\1,p")
|
sed -n "s,^\(.*\)\.path $dir\$,\\1,p")
|
||||||
|
|
Loading…
Add table
Reference in a new issue