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.
This commit is contained in:
Nuno Silva 2023-01-22 12:58:40 +00:00
parent 3affff66e4
commit a7acc89188
1 changed files with 2 additions and 2 deletions

View File

@ -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