|
2 | 2 | title: Troubleshoot problems with Bicep installation
|
3 | 3 | description: How to resolve errors and problems with your Bicep installation.
|
4 | 4 | ms.topic: conceptual
|
5 |
| -ms.date: 11/18/2021 |
| 5 | +ms.date: 11/19/2021 |
6 | 6 | ---
|
7 | 7 |
|
8 | 8 | # Troubleshoot Bicep installation
|
@@ -61,20 +61,27 @@ For other **macOS** installations, use:
|
61 | 61 |
|
62 | 62 | See [User and Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings) for configuring Visual Studio Code settings.
|
63 | 63 |
|
64 |
| -## Two versions of Bicep CLI installed |
| 64 | +## Multiple versions of Bicep CLI installed |
65 | 65 |
|
66 | 66 | 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.
|
67 | 67 |
|
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. |
69 | 69 |
|
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. |
71 | 73 |
|
72 | 74 | To **keep only one installation location**, use the following steps:
|
73 | 75 |
|
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`. |
78 | 85 |
|
79 | 86 | ## Next steps
|
80 | 87 |
|
|
0 commit comments