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

vscode fails to activate Ruby environment with asdf when not started from the shell #2247

Open
xeron opened this issue Jul 2, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@xeron
Copy link

xeron commented Jul 2, 2024

Description

asdf is activated successfully when editor started from the shell using code ., but not when started from macOS Dock.

Error output:

2024-07-02 13:25:49.506 [info] (myproject) Discovered version manager asdf
2024-07-02 13:25:49.508 [info] (myproject) Running command: `. /opt/homebrew/opt/asdf/libexec/asdf.sh && asdf exec ruby -W0 -rjson -e 'STDERR.print({env: ENV.to_h,yjit:!!defined?(RubyVM::YJIT),version:RUBY_VERSION}.to_json)'` in /Users/ilarionov/workspace/devel/myproject using shell: /opt/homebrew/bin/bash
2024-07-02 13:25:49.984 [error] (myproject) Tried parsing invalid JSON environment: completion-ruby not loaded; requires bash-completion
For more information, type: completion-ruby-help

Seems like it has something to do with my extra bash-completion:

$ cat ~/.bashrc | grep completion-ruby
. ~/.bash_completion.d/completion-ruby/completion-ruby-all
@vinistock
Copy link
Member

Thank you for the bug report. It does indeed seem like your bash completions are dependent on something that doesn't exist in VS Code's NodeJS process.

Do you know exactly under which conditions completion-ruby not loaded; requires bash-completion is printed? Is it dependent on some environment variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants