Tilde ~ not recognized for Android SDK Path
$ bubblewrap init --manifest https://chatncharge.nelkinda.com/manifest.json
,-----. ,--. ,--. ,--.
| |) /_,--.,--| |-.| |-.| |,---.,--. ,--,--.--.,--,--.,---.
| .-. | || | .-. | .-. | | .-. | |.'.| | .--' ,-. | .-. |
| '--' ' '' | `-' | `-' | \ --| .'. | | \ '-' | '-' '
`------' `----' `---' `---'`--'`----'--' '--`--' `--`--| |-'
`--'
? Do you want Bubblewrap to install JDK?
(Enter "No" to use your JDK installation) No
? Path to your existing JDK: /home/christian.hujer/.sdkman/candidates/java/11.0.19.fx-zulu/
? Do you want Bubblewrap to install Android SDK?
(Enter "No" to use your installation) No
? Path to your existing Android SDK: ~/Android/Sdk
Android Sdk not found
? Path to your existing Android SDK: /home/christian.hujer/Android/Sdk
Describe the bug
When I enter the path to my Android Sdk with ~, bubblewrap does not find the Sdk. When I enter the full path, manually expanding ~ to my homedirectory, bubblewrap finds the Sdk. Like every well-behaved program that processes paths on a Unix system, bubblewrap should support tilde-expansion.
To Reproduce Steps to reproduce the behavior:
- Start bubblewrap for the first time.
- Enter the path to your JDK.
- Enter the path to your Android Sdk, using ~
Expected behavior
A path with ~ is supported, expanding ~ to the user's home directory.
Actual behavior
bubblewrap doesn't find the Android Sdk when its path starts with ~.
Desktop (please complete the following information):
- OS: Linux
Further Notes I did not test other paths like the JDK path for tilde expansion. The bug might be with other paths as well.
I don't see anything obvious in the code (it just use's Node's fs implementation) - and, looking for the "Android Sdk not found" message in the code, I'm not able to find it. Need to try to reproduce to understand what's going on.