mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-04-15 08:46:25 +00:00
fix: in URI use proper groups
This commit is contained in:
parent
fad0282b5f
commit
d0e36622c1
1 changed files with 3 additions and 3 deletions
|
@ -123,13 +123,13 @@ flakeFlags=(--extra-experimental-features 'nix-command flakes')
|
|||
if [ -n "$flake" ]; then
|
||||
# Offical regex from https://www.rfc-editor.org/rfc/rfc3986#appendix-B
|
||||
if [[ "${flake}" =~ ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? ]]; then
|
||||
scheme=${BASH_REMATCH[2]} # eg. http
|
||||
authority=${BASH_REMATCH[4]} # eg. www.ics.uci.edu
|
||||
scheme=${BASH_REMATCH[1]} # eg. http:
|
||||
authority=${BASH_REMATCH[3]} # eg. //www.ics.uci.edu
|
||||
path=${BASH_REMATCH[5]} # eg. /pub/ietf/uri/
|
||||
queryWithQuestion=${BASH_REMATCH[6]}
|
||||
fragment=${BASH_REMATCH[9]}
|
||||
|
||||
flake=${scheme}://${authority}${path}${queryWithQuestion}
|
||||
flake=${scheme}${authority}${path}${queryWithQuestion}
|
||||
flakeAttr=${fragment}
|
||||
fi
|
||||
if [ -z "$flakeAttr" ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue