Skip to content

Commit 9135973

Browse files
committed
update dual installation troubleshooting
1 parent 7f012f2 commit 9135973

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

articles/azure-resource-manager/bicep/installation-troubleshoot.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Troubleshoot problems with Bicep installation
33
description: How to resolve errors and problems with your Bicep installation.
44
ms.topic: conceptual
5-
ms.date: 11/18/2021
5+
ms.date: 11/19/2021
66
---
77

88
# Troubleshoot Bicep installation
@@ -61,20 +61,27 @@ For other **macOS** installations, use:
6161

6262
See [User and Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings) for configuring Visual Studio Code settings.
6363

64-
## Two versions of Bicep CLI installed
64+
## Multiple versions of Bicep CLI installed
6565

6666
If you manually install the Bicep CLI to more than one location, you may notice unexpected behavior such as the Bicep CLI not updating when you run the [upgrade command](bicep-cli.md#upgrade). Or, you may notice that running `az bicep version` returns one version, but `bicep --version` returns a different version.
6767

68-
To resolve this issue, you can either update both locations, or delete one location and add the other location to your path.
68+
To resolve this issue, you can either update all locations, or select one location to maintain and delete the other locations.
6969

70-
To **keep both installation locations**, use `az bicep upgrade` to update one version. For the other version, use the same method you used earlier to [manually install the Bicep CLI](install.md#install-manually).
70+
First, open your command prompt (not PowerShell), and run `where bicep`. This command returns the locations of your Bicep installations. If you're using the instance of Bicep CLI that is managed by Azure CLI, you won't see this installation because it's not added to the PATH. If `where bicep` returns only one location, it may be that the conflicting versions you're seeing is between the manual installation and the Azure CLI installation.
71+
72+
To **keep all installation locations**, use the same method you used earlier to [manually install the Bicep CLI](install.md#install-manually) for all locations you want to maintain. If you're using Azure CLI, run `az bicep upgrade` to update that version.
7173

7274
To **keep only one installation location**, use the following steps:
7375

74-
1. Open your command prompt (not PowerShell), and run `where bicep`. This command returns the location of the Bicep installation.
75-
1. Delete the installation that was returned in the previous step.
76-
1. Remove the location from your **PATH** environment variable.
77-
1. Add your other installation location to the **PATH** variable. For Windows, the location maintained by Azure CLI is `%USERPROFILE%\.Azure\bin`.
76+
1. Delete the files for the installations you don't want to keep.
77+
1. Remove those locations from your **PATH** environment variable.
78+
79+
If you have both a **manual installation and the instance managed by Azure CLI**, you can combine your usage to one instance.
80+
81+
1. Delete the manual installation location.
82+
1. Add the location of the Bicep CLI installed by Azure CLI to the **PATH** variable. For Windows, the location maintained by Azure CLI is `%USERPROFILE%\.Azure\bin`.
83+
84+
After adding the Azure CLI instance to the PATH, you can use that version with either `az bicep` or `bicep`.
7885

7986
## Next steps
8087

0 commit comments

Comments
 (0)