summaryrefslogtreecommitdiff
path: root/cli/Cargo.toml
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2023-11-29 19:52:25 +0100
committerGitHub <noreply@github.com>2023-11-29 18:52:25 +0000
commitae327d0a83be3ad56d42cad7db0b15ae8e853f06 (patch)
tree2698cc7b5f67edcb8bf59f79e079cd7bfa01f416 /cli/Cargo.toml
parent9ac405d587ca1465debd4a65a09324b7a6b2c04f (diff)
build(cli): allow to build without upgrade feature (#19910)
The self-upgrade feature is undesirable when deno is installed from (Linux) distribution repository - using a system package manager. This change will allow package maintainers to build deno with the "upgrade" subcommand and background check disabled. When the user runs `deno upgrade <args>` and the upgrade feature is disabled, it will exit with error message explaining that this deno binary was built without the upgrade feature. Note: This patch is already used in the Alpine Linux’s [deno](https://pkgs.alpinelinux.org/packages?name=deno) package.
Diffstat (limited to 'cli/Cargo.toml')
-rw-r--r--cli/Cargo.toml6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index b4f552da4..b793d27b0 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -27,7 +27,11 @@ harness = false
path = "./bench/lsp_bench_standalone.rs"
[features]
-default = ["__vendored_zlib_ng"]
+default = ["upgrade", "__vendored_zlib_ng"]
+# A feature that enables the upgrade subcommand and the background check for
+# available updates (of deno binary). This is typically disabled for (Linux)
+# distribution packages.
+upgrade = []
# A dev feature to disable creations and loading of snapshots in favor of
# loading JS sources at runtime.
__runtime_js_sources = ["deno_runtime/__runtime_js_sources"]