mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
test: Do not run Nu test if it does not exist (#1423)
Co-authored-by: Trevor Brown <Stratus3D@users.noreply.github.com>
This commit is contained in:
parent
b21dc46d70
commit
035e247056
1
.github/workflows/tests.yml
vendored
1
.github/workflows/tests.yml
vendored
@ -66,4 +66,3 @@ jobs:
|
||||
run: bats test
|
||||
env:
|
||||
GITHUB_API_TOKEN: ${{ github.token }}
|
||||
SKIP_NUSHELL_TESTS: "${{ matrix.os == 'ubuntu-18.04' && 'YES' }}"
|
||||
|
@ -3,10 +3,11 @@
|
||||
load test_helpers
|
||||
|
||||
setup() {
|
||||
if [ "${SKIP_NUSHELL_TESTS}" = 'YES' ]; then
|
||||
skip "skipping nushell tests"
|
||||
fi
|
||||
cd $(dirname "$BATS_TEST_DIRNAME")
|
||||
|
||||
if ! command -v nu; then
|
||||
skip "Nu is not installed"
|
||||
fi
|
||||
}
|
||||
|
||||
cleaned_path() {
|
||||
@ -20,7 +21,7 @@ cleaned_path() {
|
||||
let-env PATH = ( '$(cleaned_path)' | split row ':' )
|
||||
let-env ASDF_NU_DIR = '$PWD'
|
||||
|
||||
source asdf.nu
|
||||
source asdf.nu
|
||||
|
||||
echo \$env.ASDF_DIR
|
||||
")
|
||||
@ -37,9 +38,9 @@ cleaned_path() {
|
||||
let-env PATH = ( '$(cleaned_path)' | split row ':' )
|
||||
let-env ASDF_NU_DIR = '$PWD'
|
||||
|
||||
source asdf.nu
|
||||
source asdf.nu
|
||||
|
||||
|
||||
|
||||
\$env.PATH | to text
|
||||
")
|
||||
[ "$?" -eq 0 ]
|
||||
@ -56,8 +57,8 @@ cleaned_path() {
|
||||
let-env PATH = ( '$(cleaned_path)' | split row ':' )
|
||||
let-env ASDF_NU_DIR = '$PWD'
|
||||
|
||||
source asdf.nu
|
||||
source asdf.nu
|
||||
source asdf.nu
|
||||
source asdf.nu
|
||||
|
||||
echo \$env.PATH
|
||||
")
|
||||
@ -73,7 +74,7 @@ cleaned_path() {
|
||||
let-env PATH = ( '$(cleaned_path)' | split row ':' )
|
||||
let-env ASDF_NU_DIR = '$PWD'
|
||||
|
||||
source asdf.nu
|
||||
source asdf.nu
|
||||
|
||||
echo \$env.ASDF_DIR
|
||||
")
|
||||
@ -89,7 +90,7 @@ cleaned_path() {
|
||||
let-env PATH = ( '$(cleaned_path)' | split row ':' )
|
||||
let-env ASDF_NU_DIR = '$PWD'
|
||||
|
||||
source asdf.nu
|
||||
source asdf.nu
|
||||
which asdf | get path | to text
|
||||
")
|
||||
[ "$?" -eq 0 ]
|
||||
@ -103,7 +104,7 @@ cleaned_path() {
|
||||
let-env PATH = ( '$(cleaned_path)' | split row ':' )
|
||||
let-env ASDF_NU_DIR = '$PWD'
|
||||
|
||||
source asdf.nu
|
||||
source asdf.nu
|
||||
asdf info
|
||||
")
|
||||
[ "$?" -eq 0 ]
|
||||
|
Loading…
Reference in New Issue
Block a user