Skip to content

Instantly share code, notes, and snippets.

@JacobTDC
Last active October 16, 2024 19:09
Show Gist options
  • Select an option

  • Save JacobTDC/dfbad72c1328799962fdff9cb2a3cd17 to your computer and use it in GitHub Desktop.

Select an option

Save JacobTDC/dfbad72c1328799962fdff9cb2a3cd17 to your computer and use it in GitHub Desktop.
A script to install and run VS Code on Termux
Object.defineProperty(process, "platform", {
get() {
return "linux"
},
})
#!/data/data/com.termux/files/usr/bin/bash
if ! dpkg -s nodejs-lts > /dev/null 2>&1; then
echo code-server requires nodejs-lts.
exit 1
fi
export NODE_OPTIONS="--require android-as-linux.js"
export VSCODE_APPDATA="$HOME/.local/share"
exec npm exec -- code-server@latest $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment