sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.12k stars 136 forks source link

(minor) Cryptic error when (re-)installing SST CLI #329

Open pketienne opened 2 months ago

pketienne commented 2 months ago

Preliminary Note: This is almost certainly a very low priority issue.

Issue Behavior: When attempting to install the SST CLI (for Ion), if the binary has already been installed, the command results in the following error: main: line 60: warning: command substitution: ignored null byte in input.

Environment: Kernel: 6.5.0-27-generic OS: Ubuntu 22.04 Node: 20.12.2 Npm: 10.5.0

To reproduce the error:

  1. Ensure the SST CLI is not installed by removing the ~/.sst directory and export PATH=/home/pke/.sst/bin:$PATH line in your ~/.bashrc.
  2. Follow the instructions for installing the SST CLI.
  3. Re-run that same command (curl -fsSL https://ion.sst.dev/install | bash).

Expected Behavior: Instead of the error mentioned above, I would expect that re-running the installation script would result in a more intentional message, maybe something similar to the following:

SST already installed. ❍ ion version: 0.0.295.
A newer version (0.0.328) is available.
Run "sst upgrade" to migrate to the latest version.

Side Note: Again, this is a very minor issue, but I felt that contributors to the project might like to have a record of this for once Ion has a full production release. Cheers!

jayair commented 2 months ago

Yeah we should fix this. Would appreciate a PR!

jayair commented 2 months ago

We can look at what Bun does for its installer script btw.