diff --git a/pages/en/download/package-manager.md b/pages/en/download/package-manager.md index eff92341cc5a2..030bfc6c45221 100644 --- a/pages/en/download/package-manager.md +++ b/pages/en/download/package-manager.md @@ -156,7 +156,7 @@ Download the [macOS Installer](/#home-downloadhead) directly from the [nodejs.or _If you want to download the package with bash:_ ```bash -curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/" +curl "https://nodejs.org/dist/latest/$(curl -s https://nodejs.org/dist/latest/ | grep "pkg" | cut -d'"' -f 2)" -o "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/" ``` ### Alternatives