Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use built-in xdg-open on Android #88

Merged
merged 1 commit into from
Mar 14, 2018

Conversation

CrshOverride
Copy link
Contributor

When using opn inside of Termux on Android devices (and Chrome OS), the local version of xdg-open fails because of architecture issues. In these situations xdg-open is available system-wide. This PR updates the cmd to use the system-wide xdg-open on android devices.

@sindresorhus
Copy link
Owner

the local version of xdg-open fails because of architecture issues

What architecture issues? How is the system-wide xdg-open different from the bundled one?

@CrshOverride
Copy link
Contributor Author

@sindresorhus My apologies. I failed to look at xdg-open and assumed the behavior was what I was seeing elsewhere. Architecture has nothing to do with the issue. The file layout when using termux on an Android/Chrome OS device is the issue. There is no /bin/sh or /usr/bin/env. Everything lives in /data/data/com.termux/files/usr/bin/sh, etc.

The error I'm seeing is because /bin/sh from the shebang can't be found on my device. Using the xdg-open from the PATH uses a version with the proper shebang for Android/Chrome OS devices.

@sindresorhus sindresorhus merged commit 60accb5 into sindresorhus:master Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants