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/args/flags.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'cli/args') diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 555f2f312..6e79df675 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -2202,6 +2202,7 @@ update to a different location, use the --output flag deno upgrade --output $HOME/my_deno", ) + .hide(cfg!(not(feature = "upgrade"))) .defer(|cmd| { cmd .arg( -- cgit v1.2.3