tests: extend guessing $FLAKE_URL to non-github cases

This commit is contained in:
Alexander Sosedkin 2022-11-06 20:39:09 +01:00 committed by Tobias Happ
parent 70bc99a562
commit 587825a1e4

View file

@ -1,4 +1,4 @@
# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE. # Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE.
# call _setup when defining a setup function in your test # call _setup when defining a setup function in your test
_setup() { _setup() {
@ -20,6 +20,8 @@ _setup() {
FLAKE_URL=github:$repoUser/$repoName/$repoBranch FLAKE_URL=github:$repoUser/$repoName/$repoBranch
elif [[ "$channelUrl" == file:///n-o-d/archive.tar.gz ]]; then elif [[ "$channelUrl" == file:///n-o-d/archive.tar.gz ]]; then
FLAKE_URL=/n-o-d/unpacked FLAKE_URL=/n-o-d/unpacked
else
FLAKE_URL="$channelUrl"
fi fi
echo "autodetected flake url: $FLAKE_URL" echo "autodetected flake url: $FLAKE_URL"