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

Prevent accessing rootUri if there's no git repository #2727

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

vinistock
Copy link
Member

Motivation

Closes #2725

If the user is developing on a repository not tracked by git, then api.openRepository returns null and the line immediately after fails when trying to access rootUri.

Implementation

We need to check that there is indeed a git repository before trying to read the root URI.

@vinistock vinistock added bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes labels Oct 15, 2024
@vinistock vinistock self-assigned this Oct 15, 2024
@vinistock vinistock requested a review from a team as a code owner October 15, 2024 21:05
@vinistock vinistock requested review from andyw8 and st0012 October 15, 2024 21:05
@vinistock vinistock merged commit f8ed1d7 into main Oct 15, 2024
35 checks passed
@vinistock vinistock deleted the vs-prevent-failure-on-non-git-repo branch October 15, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Activating extension Shopify.ruby-lsp failed (due to no git repo)
2 participants