You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2024/11/22 18:19:52 UTC

(pulsar-site) 02/02: Improve instructions how to fix broken node & corepack homebrew installation

This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git

commit 2e1ca48d3e3ca9dbf0ebc185a21662e55ba95787
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Fri Nov 22 20:18:11 2024 +0200

    Improve instructions how to fix broken node & corepack homebrew installation
---
 contribute/document-preview.md | 2 ++
 preview.sh                     | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/contribute/document-preview.md b/contribute/document-preview.md
index 7baddc4b3bff..0dfe8914fbbd 100644
--- a/contribute/document-preview.md
+++ b/contribute/document-preview.md
@@ -56,6 +56,8 @@ brew unlink node@20
 brew install node@20
 # recreate symlinks
 brew link node@20
+# delete broken symlinks in /opt/homebrew/bin
+find /opt/homebrew/bin -type l ! -exec test -e {} \; -delete
 # enable corepack, if the command fails, remove the conflicting files from `/opt/homebrew/bin` and try again
 corepack enable
 ```
diff --git a/preview.sh b/preview.sh
index fe7a5c97c255..08fe1d241e08 100755
--- a/preview.sh
+++ b/preview.sh
@@ -22,7 +22,7 @@ show_yarn_installation_help() {
     echo "You will need to activate corepack by running:"
     echo "corepack enable"
     echo "Don't install yarn separately from a package manager. With Homebrew, uninstall any existing yarn installation with 'brew uninstall yarn'"
-    echo "You might have to run 'brew unlink node; brew link node; corepack enable' to fix the installation."
+    echo "You might have to run 'brew unlink node; brew link node; find /opt/homebrew/bin -type l ! -exec test -e {} \; -delete; corepack enable' to fix the installation."
     echo "If 'corepack enable' fails due to file conflicts, remove the conflictings files manually from /opt/homebrew/bin and try again."
 }