Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echo failed dependency in add-to-bin #569

Closed

Conversation

nickcurran
Copy link

build-debug.sh and run-debug.sh fail silently when a dependency is missing, e.g., fish, rust, xcbeautify. This adds an output message indicating when a dependency is missing, e.g., Dependency xcbeautify not found.

@nikitabobko
Copy link
Owner

It's by design that it doesn't fail. All of those dependencies are optional (e.g. you only need fish if you want to build shell completion)

build-debug.sh and run-debug.sh fail silently when a dependency is missing

Are you sure? I just tried to run run-debug.sh with the following patch, and it run without problems. Maybe you mean build-release.sh?

diff --git a/script/setup.sh b/script/setup.sh
index 49bb2998..0b51f141 100644
--- a/script/setup.sh
+++ b/script/setup.sh
@@ -6,7 +6,7 @@ set -o pipefail # Any command failed in the pipe fails the whole pipe
 
 add-to-bin() {
     /usr/bin/which "$1" &> /dev/null && \
-        cat > ".deps/bin/${2:-$1}" <<EOF
+        /bin/cat > ".deps/bin/${2:-$1}" <<EOF
 #!/bin/bash
 exec '$(/usr/bin/which "$1")' "\$@"
 EOF
@@ -16,18 +16,18 @@ if /bin/test -z "${NUKE_PATH:-}"; then
     /bin/rm -rf .deps/bin
     /bin/mkdir -p .deps/bin
 
-    add-to-bin bash not-outdated-bash # build-shell-completion.sh
-    add-to-bin brew # install-from-sources.sh
-    add-to-bin bundle # Ruby, asciidoc
-    add-to-bin bundler # Ruby, asciidoc
-    add-to-bin cargo
-    add-to-bin fish
-    add-to-bin git
-    add-to-bin rustc
-    add-to-bin xcbeautify
+    # add-to-bin bash not-outdated-bash # build-shell-completion.sh
+    # add-to-bin brew # install-from-sources.sh
+    # add-to-bin bundle # Ruby, asciidoc
+    # add-to-bin bundler # Ruby, asciidoc
+    # add-to-bin cargo
+    # add-to-bin fish
+    # add-to-bin git
+    # add-to-bin rustc
+    # add-to-bin xcbeautify
 
     export PATH="${PWD}/.deps/bin:/bin:/usr/bin"
-    chmod +x .deps/bin/*
+    # chmod +x .deps/bin/*
     export NUKE_PATH=1
 fi

@nikitabobko nikitabobko closed this Oct 5, 2024
@nickcurran
Copy link
Author

Yes, I'm very sure which commands I'm running that fail before my suggested changes: run-debug.sh and build-debug.sh.

Is it your intent that I comment out the dependencies that I don't intend to install? It would be easier if add-to-bin didn't fail silently - maybe don't fail at all and show a warning?

@nikitabobko nikitabobko added the pr-rejected Pull Request is rejected label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-rejected Pull Request is rejected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants