Skip to content

fix: treat android as linux when picking the file service - #275

Open
kukirin-ui wants to merge 1 commit into
voidcosmos:mainfrom
kukirin-ui:fix/android-platform
Open

kukirin-ui wants to merge 1 commit into
voidcosmos:mainfrom
kukirin-ui:fix/android-platform

Conversation

@kukirin-ui

Copy link
Copy Markdown

On Termux, Node reports process.platform as 'android', so the OSServiceMap lookup comes back undefined and npkill dies at startup. This maps android to UnixFilesService, as suggested in the issue.

Added a test in npkill.test.ts that fakes process.platform = 'android' and checks the default file service is the unix one. It fails without the change. npm test and tsc pass, and eslint is clean on the changed files.

Closes #274

This branch has not been deployed

No deployments
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.

Support for Android / Termux (process.platform === 'android' )

1 participant