Merge pull request #600 from konradmalik/uri-builder-fix
fix: add '://' to built flake uri
This commit is contained in:
commit
379d42fad6
2 changed files with 7 additions and 3 deletions
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
|
@ -114,3 +114,7 @@ jobs:
|
|||
darwin-rebuild build \
|
||||
--flake /tmp/test-nix-darwin-submodules?submodules=1#simple \
|
||||
--override-input darwin .
|
||||
# Should also succeed
|
||||
darwin-rebuild build \
|
||||
--flake git+file:///tmp/test-nix-darwin-submodules?submodules=1#simple \
|
||||
--override-input darwin .
|
||||
|
|
|
|||
|
|
@ -123,9 +123,9 @@ 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]}
|
||||
authority=${BASH_REMATCH[4]}
|
||||
path=${BASH_REMATCH[5]}
|
||||
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]}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue