8000 Cannot use rtx wit appimages - How would I make this work? · Issue #921 · jdx/mise · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cannot use rtx wit appimages - How would I make this work? #921

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

Closed
tracure1337 opened this issue Sep 30, 2023 · 4 comments · Fixed by #1252
Closed

Cannot use rtx wit appimages - How would I make this work? #921

tracure1337 opened this issue Sep 30, 2023 · 4 comments · Fixed by #1252
Labels

Comments

@tracure1337
Copy link

In this case it's the cursor editor (a vscode derivative).

[🔴] × RTX_DEBUG=1 rtx list            
[DEBUG] rtx::config: Files: ~/Documents/xxxx/data_projects/xxx/xxx/.tool-versions, ~/.rtx.toml
Installed Plugins: assh, direnv, poetry, rust
Error: 
   0: cursor-0.11.8_ac870972f80c2ffcb576280407f9db92.AppImage is not a valid shim

Location:
   src/shims.rs:67

Version:
   2023.9.2 linux-x64 (e49575f 2023-09-28)

Suggestion: Run with RTX_DEBUG=1 for more information.

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

So for example the poetry command is not available.

Thanks for looking into this. I usually do not use appimages but some projects I use do :)

@jdx
Copy link
Owner
jdx commented Oct 4, 2023

I'm not clear on what it is you're actually trying to do. For some context, what is happening here is the binary isn't named "rtx", in that case rtx assumes it is a shim and attempts to call the underlying tool: https://github.com/jdx/rtx/blob/main/src/shims.rs#L28-L30

Perhaps there is a way we can alter that logic.

@tracure1337
Copy link
Author
tracure1337 commented Nov 9, 2023

@jdx My apology for taking so long to reply.

I am using https://cursor.so/ and I get the following error when opening a terminal.

rtx cursor-0.14.0-build-231102m6tuamwbx_e882239ff71d2d2f8fad7f366fedb5ee.AppImage is not a valid shim
rtx Run with RTX_DEBUG=1 for more information

I tried adding /home/cocoonkid/.local/share/rtx/installs/node/20.8.0/bin/ as executable folder in the settings but no dice.
(prettier works though since it finds the binary)

[🔍] × which npm
/usr/bin/npm

But when I open a regular terminal:

 ╰─λ rtx list
assh   2.16.0          ~/.rtx.toml      latest
direnv 2.32.3          ~/.rtx.toml      latest
java   21.0.0          ~/.tool-versions 21.0.0
node   20.8.0 (outdated) ~/.rtx.toml    latest
poetry 1.6.1 (outdated) ~/.rtx.toml     latest
python 3.9.18          ~/.rtx.toml      3.9.18
python 3.11.5
rust   1.73.0          ~/.rtx.toml      latest
Python virtualenv project detected. Run mkvenv to setup autoswitching
Time: 0h:00m:08s

 ╭─cocoonkid@arch in ~ via  v20.8.0 via  v3.9.18 took 7s
 ╰─λ which npm
**/home/cocoonkid/.local/share/rtx/installs/node/20.8.0/bin/npm**

Currently I just run whatever I need in a separate terminal.
So this is no showstopper in any way.

But I thought I let you know about this issue with AppImage distributed applications.

jdx added a commit that referenced this issue Dec 23, 2023
@jdx jdx closed this as completed in #1252 Dec 23, 2023
jdx added a commit that referenced this issue Dec 23, 2023
jdx pushed a commit that referenced this issue Apr 9, 2024
Co-authored-by: Jean-Yves LENHOF <jean-yves@lenhof.eu.org>
Co-authored-by: James Hegedus <jthegedus@hey.com>
@vinismarques
Copy link
vinismarques commented Apr 25, 2024

@jdx I'm running version 2024.4.8-1 on Arch and if I understood correctly, it should be fixed in this version. Should I configure mise in a specific way to avoid this problem with AppImage? I'm using Cursor here as well, similar to OP.

Things I tried (Zsh):

  1. Using eval "$(mise activate zsh)" on the zshrc file: when starting a new integrated terminal on Cursor, it opens two new unsaved tabs/files in the current window called "activate", and "zsh".
  2. Using eval "$(mise activate --shims)": when starting a new integrated terminal on Cursor, it opens one new unsaved tab/file called "activate" in the current window and prints "Warning: 'shims' is not in the list of known options, but still passed to Electron/Chromium." to the terminal.
  3. Using export PATH="$HOME/.local/share/mise/shims:$PATH": does not open any weird tabs when starting a new integrated terminal, nor outputs any error/warning message to the terminal, but when I try something like node -v it opens a new Cursor window, instead of printing the version.
  4. Running mise doctor on the integrated terminal: opens unsaved file called "doctor".
  5. Running mise one two three on the integrated terminal: will open unsaved files called "one", "two", and "three" in the current window.
  6. Running just mise on the integrated terminal: opens a new IDE window.

On Bash, it seems to work fine with all methods... eval "$(mise activate bash)", eval "$(mise activate --shims)" and export PATH="$HOME/.local/share/mise/shims:$PATH". It prints the node version as expected when using node -v and does not open any weird tab or window.

I also have VSCode (non-AppImage), which Cursor is based on and it works with Zsh, so it seems something weird is going on only when using Zsh+AppImage.

@jorgeavaldez
Copy link
jorgeavaldez commented Aug 26, 2024

i'm running into the same issue when using zsh and cursor on manjaro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
0