From b06c5c57da8ff9c4f8d0fb54159c3b27edcff012 Mon Sep 17 00:00:00 2001 From: neuroradiology Date: Mon, 23 Dec 2024 06:30:49 -0700 Subject: [PATCH 1/3] Clarify why an anonymous function is used during installation The original explanation links to a website that no longer exists (http://blog.existentialize.com/dont-pipe-to-your-shell.html) The content and rationale is still visible in a discussion on ycombinator, however, so that discussion is used as a surrogate. --- install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 00ec429e8..2099bbdc7 100755 --- a/install.sh +++ b/install.sh @@ -41,8 +41,14 @@ fi # We wrap the entire script in a big function which we only call at the very end, in order to # protect against the possibility of the connection dying mid-script. This protects us against -# the problem described in this blog post: -# http://blog.existentialize.com/dont-pipe-to-your-shell.html +# the problem described in a since-deleted blog post that is discussed on HN: +# https://news.ycombinator.com/item?id=6650987 +# Briefly, if the install script has a line that says +# +# > rm -rf $somefolder +# +# and the network fails (so the script terminates) before the last argument is received, then +# piping it into the shell will wipe the filesystem. _() { set -euo pipefail From 9347ad949f604e91e8e6c214bab2a07710bf739d Mon Sep 17 00:00:00 2001 From: neuroradiology Date: Mon, 23 Dec 2024 06:35:49 -0700 Subject: [PATCH 2/3] Update install documentation link to sandstorm.org --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2099bbdc7..2009aaf8b 100755 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ # # If `curl|bash` makes you uncomfortable, see other options here: # -# https://docs.sandstorm.io/en/latest/install/ +# https://docs.sandstorm.org/install/ # # This script only modifies your system in the following ways: # - Install Sandstorm into the directory you choose, typically /opt/sandstorm. From 21d825e3872ba167283a28414c849a287c1259e9 Mon Sep 17 00:00:00 2001 From: neuroradiology Date: Mon, 23 Dec 2024 06:40:40 -0700 Subject: [PATCH 3/3] Update install.sh to remove ".io" from the "sandstorm.io team" --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 2009aaf8b..1078d51bb 100755 --- a/install.sh +++ b/install.sh @@ -91,7 +91,7 @@ fail() { # Users can export REPORT=no to avoid the error-reporting behavior, if they need to. if [ "${REPORT:-yes}" = "yes" ] ; then - if USE_DEFAULTS=no prompt-yesno "Hmm, installation failed. Would it be OK to send an anonymous error report to the sandstorm.io team so we know something is wrong? + if USE_DEFAULTS=no prompt-yesno "Hmm, installation failed. Would it be OK to send an anonymous error report to the sandstorm team so we know something is wrong? It would only contain this error code: $error_code" "yes" ; then echo "Sending problem report..." >&2 local BEARER_TOKEN="4-Og3Ty2SPmpkZGnVc_8hnBGXK0JBBXDeBn_55FWixJ" @@ -464,7 +464,7 @@ assert_linux_x86_64() { fail "E_NON_LINUX" "Sandstorm requires Linux. If you want to run Sandstorm on a Windows or Mac system, you can use Vagrant or another virtualization tool. See our install documentation: -- https://docs.sandstorm.io/en/latest/install/" +- https://docs.sandstorm.org/install" fi if [ "$(uname -m)" != x86_64 ]; then