PrateekKumarSingh / AzViz

⚡ ☁ Azure Visualizer aka 'AzViz' : A #powershell module to automatically generate Azure resource topology diagrams by just typing a PowerShell cmdlet and passing the name of one or more Azure Resource groups
MIT License
584 stars 146 forks source link

Can't execute on MacOS #94

Open gothvf opened 2 years ago

gothvf commented 2 years ago

I can't figure out this one:

Export-AzViz: 'GraphViz' is not installed on this system and is a prerequisites for this module to work. Please download and install from here: https://graphviz.org/download/ and re-run this command.

Thanks!

cjkoester commented 2 years ago

If you're using an M1 Mac, you need to add the path '/opt/homebrew/bin/dot' to the PossibleGraphVizPaths array in AzViz/src/private/Get-DOTExecutable.ps1

'/opt/homebrew/bin' is the directory where Homebrew stores packages on M1 Macs.

$PossibleGraphVizPaths = @(
    'C:\Program Files\NuGet\Packages\Graphviz*\dot.exe',
    'C:\program files*\GraphViz*\bin\dot.exe',
    '/usr/local/bin/dot',
    '/usr/bin/dot',
    '/opt/homebrew/bin/dot'
)
gothvf commented 2 years ago

Thanks a lot! That was exactly my problem!