2791: netlify: fix mdbook update r=messense a=davidhewitt

Fixes the following error on netlify builds:

```text
6:34:54 PM: + '[' 'mdbook v0.4.21' '!=' 'mdbook v0.4.22' ']'
6:34:54 PM: + cargo install mdbook@0.4.22
6:34:54 PM:     Updating crates.io index
6:35:00 PM:  Downloading crates ...
6:35:00 PM:   Downloaded mdbook v0.4.22
6:35:00 PM: error: binary `mdbook` already exists in destination
6:35:00 PM: Add --force to overwrite
```

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
This commit is contained in:
bors[bot] 2022-11-30 08:47:43 +00:00 committed by GitHub
commit a67c5782e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ towncrier build --yes --version Unreleased --date TBC
MDBOOK_VERSION=$(cargo search mdbook --limit 1 | head -1 | tr -s ' ' | cut -d ' ' -f 3 | tr -d '"') MDBOOK_VERSION=$(cargo search mdbook --limit 1 | head -1 | tr -s ' ' | cut -d ' ' -f 3 | tr -d '"')
INSTALLED_MDBOOK_VERSION=$(mdbook --version || echo "none") INSTALLED_MDBOOK_VERSION=$(mdbook --version || echo "none")
if [ "${INSTALLED_MDBOOK_VERSION}" != "mdbook v${MDBOOK_VERSION}" ]; then if [ "${INSTALLED_MDBOOK_VERSION}" != "mdbook v${MDBOOK_VERSION}" ]; then
cargo install mdbook@${MDBOOK_VERSION} cargo install mdbook@${MDBOOK_VERSION} --force
fi fi
pip install nox pip install nox