Skip to content

Commit

Permalink
Allow renamed vscode .app on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTripleV committed Jan 19, 2025
1 parent 9b3a00a commit 9b0dbc2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,12 @@ private async Task RunVsCodeExtensionsSetup()
break;
case Platform.MacArm64:
case Platform.Mac64:
codeExe = Path.Combine(configurationProvider.InstallDirectory, "vscode", "Visual Studio Code.app", "Contents", "Resources", "app", "bin", "code");
var appDirectories = Directory.GetDirectories(Path.Combine(configurationProvider.InstallDirectory, "vscode"), "*.app");
if (appDirectories.Length != 1)
{
throw new InvalidOperationException("Expected exactly one .app directory in the vscode folder.");
}
codeExe = Path.Combine(appDirectories[0], "Contents", "Resources", "app", "bin", "code");
break;
case Platform.Linux64:
codeExe = Path.Combine(configurationProvider.InstallDirectory, "vscode", "VSCode-linux-x64", "bin", "code");
Expand Down

0 comments on commit 9b0dbc2

Please sign in to comment.