deno: Disable deno upgrade
Currently Deno doesn't currently provide prebuilt binaries for Android. But when it will do, it will allow users to upgrade Deno by using `deno upgrade`. This might break existing deno installation. So just encourage people to not use this
This commit is contained in:
parent
f7341d7064
commit
a45d8355ac
@ -5,7 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux"
|
||||
_COMMIT=1259a3f48c00e95a8bb0964e4dabfa769a20bcde
|
||||
_COMMIT_DATE=2022.01.19
|
||||
TERMUX_PKG_VERSION=1.17.3p${_COMMIT_DATE//./}
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://github.com/denoland/deno.git
|
||||
TERMUX_PKG_GIT_BRANCH=main
|
||||
TERMUX_PKG_DEPENDS="libffi"
|
||||
|
23
packages/deno/cli-tools-upgrade.rs.patch
Normal file
23
packages/deno/cli-tools-upgrade.rs.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- ./cli/tools/upgrade.rs.orig 2022-01-20 19:18:16.459123964 +0530
|
||||
+++ ./cli/tools/upgrade.rs 2022-01-20 19:27:18.071118123 +0530
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
const RELEASE_URL: &str = "https://github.com/denoland/deno/releases";
|
||||
|
||||
+#[cfg(not(target_os = "android"))]
|
||||
pub async fn upgrade(upgrade_flags: UpgradeFlags) -> Result<(), AnyError> {
|
||||
let mut client_builder = Client::builder();
|
||||
|
||||
@@ -135,6 +136,12 @@
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+#[cfg(target_os = "android")]
|
||||
+pub async fn upgrade(upgrade_flags: UpgradeFlags) -> Result<(), AnyError> {
|
||||
+ println!("You are currently using Deno packaged by the Termux repo. To upgrade Deno, wait for the packagers to update it. This is done to prevent you from breaking your installation.");
|
||||
+ std::process::exit(1);
|
||||
+}
|
||||
+
|
||||
async fn get_latest_release_version(
|
||||
client: &Client,
|
||||
) -> Result<String, AnyError> {
|
Loading…
Reference in New Issue
Block a user