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

getSolutionFile silently selects the first solution when multiple are found #101

Open
BinToss opened this issue Feb 7, 2024 · 0 comments · May be fixed by #121
Open

getSolutionFile silently selects the first solution when multiple are found #101

BinToss opened this issue Feb 7, 2024 · 0 comments · May be fixed by #121
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@BinToss
Copy link
Contributor

BinToss commented Feb 7, 2024

Describe the bug

async function getSolutionFile(): Promise<string | undefined> {
	const filePattern = "**/*.sln";
	const files = await vscode.workspace.findFiles(filePattern);

	if (files.length > 0) {
		return files[0].fsPath;
	}

	return vscode.workspace.workspaceFolders?.[0].uri.fsPath;
}

This function may automatically select the "incorrect" solution file when multiple are found in the workspace.
Now, the user is given the choice of which solution file we read.

I've committed a fix, but I still need to create a separate branch and open a PR.

To Reproduce

Avalonia for VS Code

v0.0.17-v0.0.29

Avalonia version

No response

VS Code version

No response

Relevant log output

> irrelevant

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
2 participants