Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Alert shadowenv users about missing Ruby#873

Merged
vinistock merged 1 commit intomainfrom
vs/alert_shadowenv_users_about_missing_ruby
Nov 6, 2023
Merged

Alert shadowenv users about missing Ruby#873
vinistock merged 1 commit intomainfrom
vs/alert_shadowenv_users_about_missing_ruby

Conversation

@vinistock
Copy link
Copy Markdown
Member

Motivation

If the files under the .shadowenv.d directory are configured with a Ruby version that is not installed in the machine, shadowenv does not throw any errors. Instead, it returns the "activated" environment, pointing to a bunch of paths that don't actually exist.

That can be very confusing for users, so we should let them know that something is not right.

Implementation

Started checking if the RUBY_ROOT configured exists. If that directory is missing, then either the Ruby version isn't installed or it was installed elsewhere. In both cases, the solution is to re-generate the files under .shadowenv.d with the right paths.

@vinistock vinistock added the bugfix This PR will fix an existing bug label Nov 3, 2023
@vinistock vinistock self-assigned this Nov 3, 2023
@vinistock vinistock requested a review from a team as a code owner November 3, 2023 18:41
@vinistock vinistock merged commit 2bf2c35 into main Nov 6, 2023
@vinistock vinistock deleted the vs/alert_shadowenv_users_about_missing_ruby branch November 6, 2023 15:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix This PR will fix an existing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants