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

bash: --install-dir: invalid option #537

Closed
ruudk opened this issue Oct 21, 2024 · 5 comments
Closed

bash: --install-dir: invalid option #537

ruudk opened this issue Oct 21, 2024 · 5 comments

Comments

@ruudk
Copy link
Contributor

ruudk commented Oct 21, 2024

I ran Castor and saw the update message:

❯ castor

 A new Castor version is available (v0.18.2, currently running v0.15.0).

 Run the following command to update Castor:

 curl "https://castor.jolicode.com/install" | bash --install-dir castor


castor v0.15.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --no-remote       Skip the import of all remote remote packages
      --update-remotes  Force the update of remote packages
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Copied it and ran it:

$ curl "https://castor.jolicode.com/install" | bash --install-dir castor
bash: --install-dir: invalid option
Usage:  bash [GNU long option] [option] ...
        bash [GNU long option] [option] script-file ...
GNU long options:
        --debug
        --debugger
        --dump-po-strings
        --dump-strings
        --help
        --init-file
        --login
        --noediting
        --noprofile
        --norc
        --posix
        --pretty-print
        --rcfile
        --restricted
        --verbose
        --version
Shell options:
        -ilrsD or -c command or -O shopt_option         (invocation only)
        -abefhkmnptuvxBCEHPT or -o option
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6502    0  6502    0     0  73797      0 --:--:-- --:--:-- --:--:-- 73886
curl: Failed writing body
@ruudk
Copy link
Contributor Author

ruudk commented Oct 21, 2024

Also interesting, it seems I run v0.15.0 while I installed it a few days ago 🤔

@ruudk
Copy link
Contributor Author

ruudk commented Oct 21, 2024

I think I know what happened.

I had this installed months ago. Then a few days ago I tried to install it again. The installer did not overwrite the existing one, that was located in /Users/Ruud/bin/castor.

I think it would be great if the installer script detects castor being installed somewhere and then addresses the problem: either by updating it or letting me remove that file.

@pyrech
Copy link
Member

pyrech commented Oct 21, 2024

I think it would be great if the installer script detects castor being installed somewhere and then addresses the problem: either by updating it or letting me remove that file.

This already what Castor does when displaying these update instructions. But i think you just faced the issue with invalid instructions that was fixed in 0.17.1 : #471

But maybe we could add the detection of a currently installed Castor and warn the user about it 👍 Let's see what others think about it.

@lyrixx
Copy link
Member

lyrixx commented Oct 21, 2024

Let's do #538 instead, WDYT?

@ruudk
Copy link
Contributor Author

ruudk commented Oct 21, 2024

Sounds good to me!

@ruudk ruudk closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants