home: direnv: fix 'use_android'
All checks were successful
ci/woodpecker/push/check Pipeline was successful
All checks were successful
ci/woodpecker/push/check Pipeline was successful
Don't rely on `ANDROID_SDK_HOME` if it hasn't yet been defined.
This commit is contained in:
parent
b48d81451d
commit
3fb8734c56
|
@ -22,7 +22,7 @@ use_android() {
|
||||||
|
|
||||||
# Default to the latest version found
|
# Default to the latest version found
|
||||||
local ndk_version="$(_use_android_find_latest "$ANDROID_HOME/ndk" || return 1)"
|
local ndk_version="$(_use_android_find_latest "$ANDROID_HOME/ndk" || return 1)"
|
||||||
local build_tools_version="$(_use_android_find_latest "$ANDROID_SDK_HOME/build-tools" || return 1)"
|
local build_tools_version="$(_use_android_find_latest "$ANDROID_HOME/build-tools" || return 1)"
|
||||||
|
|
||||||
unset -f _use_android_find_latest
|
unset -f _use_android_find_latest
|
||||||
|
|
||||||
|
@ -54,5 +54,5 @@ use_android() {
|
||||||
export ANDROID_NDK_ROOT="$ANDROID_NDK_HOME"
|
export ANDROID_NDK_ROOT="$ANDROID_NDK_HOME"
|
||||||
|
|
||||||
PATH_add "$ANDROID_NDK_HOME"
|
PATH_add "$ANDROID_NDK_HOME"
|
||||||
PATH_add "$ANDROID_SDK_HOME/build-tools/$build_tools_version"
|
PATH_add "$ANDROID_HOME/build-tools/$build_tools_version"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue