1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-23 08:02:21 +03:00

fix: local tests

when substitutin paths in submodule tests, we need to use absolute
paths to not violate the submodule git boundary through the use of
relative paths
This commit is contained in:
David Arnold 2021-08-02 19:13:20 -05:00 committed by Parthiv Seetharaman
parent c6e398f534
commit 27c4a06f29

View File

@ -41,11 +41,12 @@ let
help = "Checks ${name} ${type}"; help = "Checks ${name} ${type}";
command = '' command = ''
set -e set -e
# set -x
diggaurl= diggaurl=
lockfile_updated=1 lockfile_updated=1
lockfile_present=1 lockfile_present=1
tempdigga="\"github:divnix/digga/$(git rev-parse HEAD)\"" tempdigga="\"path:$DEVSHELL_ROOT\""
cleanup() { cleanup() {
if is $lockfile_present; then if is $lockfile_present; then
@ -60,7 +61,7 @@ let
digga_fixture() { digga_fixture() {
# ensure: replace input # ensure: replace input
diggaurl=$({ grep -o '"github:divnix/digga.*"' flake.nix || true; }) diggaurl=$({ grep -o '"github:divnix/digga.*"' flake.nix || true; })
sed -i "s|\"github:divnix/digga/.*\"|$tempdigga|g" flake.nix sed -i "s|$diggaurl|$tempdigga|g" flake.nix
} }
trap_err() { trap_err() {