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

Customizing CWD for nested workspaces #9

Open
mltsy opened this issue Mar 21, 2023 · 1 comment
Open

Customizing CWD for nested workspaces #9

mltsy opened this issue Mar 21, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@mltsy
Copy link

mltsy commented Mar 21, 2023

I'm working in a project with a monorepo, where it's easier to open the workspace one level above the actual ruby project, so that I can also see the infrastructure configs, etc. in my Explorer. When I do this though, this extension errors out trying to run standardrb because it can't find the Gemfile/bundle, and therefore doesn't use bundle exec correctly:

[client] No Gemfile found in the current workspace
[client] Command /Users/.../.rbenv/shims/standardrb -v failed with exit code 127 (exec options: {"cwd":"/Users/.../workspaces/x/folder/projectname"})
[client] stderr:
rbenv: standardrb: command not found

One way to fix this would be adding an option to specify a custom CWD somewhere... I think it makes sense to specify this in the extension's workspace settings?? And then use that in the getCwd function if specified:

https://github.com/testdouble/vscode-standard-ruby/blob/947e6a2097a87b3129927471d9972dd04ee7be29/src/extension.ts#L77-L79

@searls
Copy link
Contributor

searls commented Mar 26, 2023

Yeah, that would work. Allowing a custom CWD would certainly be preferable to the current state, even if ultimately the perfect solution would be to figure out multiple workspace folders. Would you be interested in sending a PR?

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

No branches or pull requests

2 participants