pkgx icon indicating copy to clipboard operation
pkgx copied to clipboard

Installer fails after terminal with temporarily run tea

Open keith opened this issue 2 years ago • 11 comments

It seems that in the case I run a temporary tea invocation from the readme, and then the installer, the installer fails:

% sh <(curl tea.xyz) +rust-lang.org
######################################################################################################################################################################################### 100.0%
  k, we installed  /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/tea.xyz/v0.11.4/bin/tea

tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/gnome.org/libxml2/v2.10.3
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/openssl.org/v1.1.118
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/gnu.org/gettext/v0.21.1
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/curl.se/v7.86.0
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/perl.org/v5.36.0
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/tea.xyz/gx/cc/v0.1.0
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/zlib.net/v1.2.13
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/git-scm.org/v2.38.1
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/rust-lang.org/v1.64.0
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/rust-lang.org/cargo/v0.65.0
this is a temporary shell containing the following packages:
gnome.org/[email protected], [email protected], gnu.org/[email protected], [email protected], [email protected], tea.xyz/gx/[email protected], [email protected], [email protected], [email protected], rust-lang.org/[email protected]
when done type: `exit'

% sh <(curl https://tea.xyz)
######################################################################################################################################################################################### 100.0%
/dev/fd/14: line 173: tea: command not found
/dev/fd/14: line 173: tea: command not found

To get the installer actually working I have to create a new terminal and run it again. This is on macOS ventura.

I guess I'm in a nested session here where I should exit, and then install, but ideally this would "just work"

keith avatar Nov 04 '22 03:11 keith

Did you ever exit the REPL (I don't see it above - edit: whoops, missed your end remarks)? Definitely a bug if the installer can't run in the REPL, but I would expect the following to work:

% sh <(curl tea.xyz) +rust-lang.org
...
this is a temporary shell containing the following packages:
...
when done type: `exit'

% exit
% sh <(curl https://tea.xyz)

jhheider avatar Nov 04 '22 04:11 jhheider

something like https://github.com/teaxyz/cli/issues/124 would make it clearer.

jhheider avatar Nov 04 '22 04:11 jhheider

I didn't exit the repl, I assume if I did it would have worked for sure

keith avatar Nov 04 '22 04:11 keith

Thanks Keith, taking a look. The REPL behavior was fairly recent and we forgot to test it against the “temporary” installer mode.

mxcl avatar Nov 04 '22 10:11 mxcl

oh ok, yeah this is indeed that our “REPL” didn't provide a prompt for this shell. What shell @keith?

mxcl avatar Nov 04 '22 10:11 mxcl

Though our REPL should totes have tea in the PATH lol. Can fix that.

mxcl avatar Nov 04 '22 10:11 mxcl

Zsh, sorry should have included that

keith avatar Nov 04 '22 11:11 keith

oh weird, that's only one we currently support. Will noodle it.

mxcl avatar Nov 04 '22 11:11 mxcl

I imagine my config overwrites it

keith avatar Nov 04 '22 12:11 keith

@Keith worth a fresh try (been some work in this area I think may fix it), update first sh <(curl tea.xyz).

to be clear: the “repl” does open. The issue here is UI: your prompt doesn’t get set to tea $

mxcl avatar Nov 17 '22 14:11 mxcl

k I actually misread the issue here, Keith is saying the installer should work within the temporary REPL created by the one liner.

That's true.

mxcl avatar Dec 02 '22 16:12 mxcl

Works now

mxcl avatar Jan 14 '23 17:01 mxcl