diff options
| author | Konrad Malik <konrad.malik@gmail.com> | 2023-01-21 15:23:40 +0100 |
|---|---|---|
| committer | Konrad Malik <konrad.malik@gmail.com> | 2023-04-29 14:49:06 +0200 |
| commit | d0e36622c12f7a7fec2d46d60987f565f4cb3247 (patch) | |
| tree | 544f7026c42767ed47ea11ae096d6dd5dfd76bed | |
| parent | fad0282b5fc9c05c2751be5df79ddb8c3f1c3452 (diff) | |
fix: in URI use proper groups
| -rw-r--r-- | pkgs/nix-tools/darwin-rebuild.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/nix-tools/darwin-rebuild.sh b/pkgs/nix-tools/darwin-rebuild.sh index b2b99f0..ca0b266 100644 --- a/pkgs/nix-tools/darwin-rebuild.sh +++ b/pkgs/nix-tools/darwin-rebuild.sh @@ -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 |
