diff --git a/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs b/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs index 671f856..eb88c93 100644 --- a/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs +++ b/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs @@ -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");