Closed tekacs closed 1 year ago
Thank you for this fix. I was excited to try SurrealDB, but was instantly stopped by this issue on the very first step: running the install script! I will just add some information for those who might be searching for this.
When running the following command to install SurrealDB on Linux:
curl -sSf https://install.surrealdb.com | sh
I received this error:
main: line 58: $1: unbound variable
As stated by @tekacs above, the issue is that the install script tries to reference a positional $1
parameter. However, this parameter is not set. Since set -u
is enabled for the file on line 15, the script throws an error.
The fix is to change line 58 to the following:
if [ -v 1 ] && [ "$1" != "--nightly" ]; then
Thanks for this pull request @travishorn 🚀👍!
install works now but on my machine it still throws a v not defined
error
As of 02c1ec8bf248f4e2ec3a0b4262fb1873606aa543 the install script is broken, as it tries to dereference
$1
unconditionally even thoughset -u
is enabled for the file.This introduces a check that it's set before trying to dereference it.