PSGraph icon indicating copy to clipboard operation
PSGraph copied to clipboard

Make the paths to dot dynamic

Open Clijsters opened this issue 6 years ago • 2 comments

PSGraph searches for dot.exe (or the dot binary) in 3 locations. I would like to install GraphViz in another directory and I don't have admin rights. That makes it mandatory to pass the dot binary path on ever call to Export-PSGraph. It would be cool to add $env:Path or to make it configurable, so that one could easily add the dot path to %PATH% and is just ready to go

Clijsters avatar Sep 05 '18 08:09 Clijsters

That is a good idea. I'll try to work that in.

A quick fix is to use $PSDefaultParameterValues

$PSDefaultParameterValues["Export-PSGraph:GraphVizPath"] = "c:\folder\dot.exe"

KevinMarquette avatar Sep 14 '18 03:09 KevinMarquette

I should be able to call Get-Command and use whatever version that finds. Then fall back to using those default paths.

KevinMarquette avatar Nov 04 '18 20:11 KevinMarquette