Skip to content

Commit

Permalink
Merge pull request #821 from davidchesnut/patch-1
Browse files Browse the repository at this point in the history
Fix check for Microsoft Azure CLI substring
  • Loading branch information
millerds authored Dec 13, 2023
2 parents 1370c25 + 82ecd50 commit 0c210e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/office-addin-sso/src/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ export async function isAzureCliInstalled(): Promise<boolean> {
case "win32": {
const appsInstalledWindowsCommand: string = `powershell -ExecutionPolicy Bypass -File "${defaults.getInstalledAppsPath}"`;
const appsWindows: any = await promiseExecuteCommand(appsInstalledWindowsCommand);
cliInstalled = appsWindows.filter((app) => app.DisplayName === "Microsoft Azure CLI").length > 0;
cliInstalled = appsWindows.filter((app) => {
if (app!==null && app.DisplayName!==null){
if (app.DisplayName.includes("Microsoft Azure CLI")) return true;
}
return false;
});
// Send usage data
usageDataObject.reportSuccess("isAzureCliInstalled()", {
cliInstalled: cliInstalled,
Expand Down

0 comments on commit 0c210e9

Please sign in to comment.