From ae327d0a83be3ad56d42cad7db0b15ae8e853f06 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 29 Nov 2023 19:52:25 +0100 Subject: build(cli): allow to build without upgrade feature (#19910) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ` 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. --- cli/tools/run/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'cli/tools') diff --git a/cli/tools/run/mod.rs b/cli/tools/run/mod.rs index 21e1f7b5e..321f94fc6 100644 --- a/cli/tools/run/mod.rs +++ b/cli/tools/run/mod.rs @@ -47,6 +47,7 @@ To grant permissions, set them before the script argument. For example: // Run a background task that checks for available upgrades or output // if an earlier run of this background task found a new version of Deno. + #[cfg(feature = "upgrade")] super::upgrade::check_for_upgrades( http_client.clone(), deno_dir.upgrade_check_file_path(), -- cgit v1.2.3