From a7acc891884c8fdab239b50601ead09641aa1bd2 Mon Sep 17 00:00:00 2001 From: Nuno Silva Date: Sun, 22 Jan 2023 12:58:40 +0000 Subject: [PATCH] fix get-docker invocation with DRY_RUN sudo does not pass its env to command, so the current invocation is not a dry run, as DRY_RUN never gets passed to sh: ``` $ DRY_RUN=1 sudo env | grep -c DRY 0 ``` It does accept env variables before the command, like so: ``` $ sudo DRY_RUN=1 sh ./get-docker.sh ``` but those are subject to restrictions imposed by the security policy plugin, so it's better to just use the script argument instead. --- _includes/install-script.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/install-script.md b/_includes/install-script.md index c17f903211..4146fef790 100644 --- a/_includes/install-script.md +++ b/_includes/install-script.md @@ -34,12 +34,12 @@ of the convenience script: > Tip: preview script steps before running > -> You can run the script with the `DRY_RUN=1` option to learn what steps the +> You can run the script with the `--dry-run` option to learn what steps the > script will run when invoked: > > ```console > $ curl -fsSL https://get.docker.com -o get-docker.sh -> $ DRY_RUN=1 sudo sh ./get-docker.sh +> $ sudo sh ./get-docker.sh --dry-run > ``` This example downloads the script from