@@ -25,7 +25,7 @@ function CheckExitCode ([string]$stage)
2525
2626try {
2727 Push-Location $PSScriptRoot
28-
28+
2929 Write-Host " Installing darc..."
3030 . .\darc- init.ps1 - darcVersion $darcVersion
3131 CheckExitCode " Running darc-init"
4040
4141 $darcExe = " $env: USERPROFILE \.dotnet\tools"
4242 $darcExe = Resolve-Path " $darcExe \darc.exe"
43-
43+
4444 Create- Directory $outputFolder
45-
45+
4646 # Generate 3 graph descriptions:
4747 # 1. Flat with coherency information
4848 # 2. Graphviz (dot) file
@@ -51,26 +51,26 @@ try {
5151 $graphVizImageFilePath = " $outputFolder \graph.png"
5252 $normalGraphFilePath = " $outputFolder \graph-full.txt"
5353 $flatGraphFilePath = " $outputFolder \graph-flat.txt"
54- $baseOptions = " get-dependency-graph -- github-pat $gitHubPat --azdev-pat $azdoPat --password $barToken "
55-
54+ $baseOptions = @ ( " -- github-pat" , " $gitHubPat " , " --azdev-pat" , " $azdoPat " , " --password" , " $barToken " )
55+
5656 if ($includeToolset ) {
5757 Write-Host " Toolsets will be included in the graph..."
58- $baseOptions += " --include-toolset"
58+ $baseOptions += @ ( " --include-toolset" )
5959 }
6060
6161 Write-Host " Generating standard dependency graph..."
62- Invoke-Expression " & ` "$darcExe `" $ baseOptions --output-file $normalGraphFilePath "
62+ & " $darcExe " get-dependency - graph @ baseOptions -- output- file $normalGraphFilePath
6363 CheckExitCode " Generating normal dependency graph"
6464
6565 Write-Host " Generating flat dependency graph and graphviz file..."
66- Invoke-Expression " & ` "$darcExe `" $ baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath "
66+ & " $darcExe " get-dependency - graph @ baseOptions -- flat -- coherency -- graphviz $graphVizFilePath -- output- file $flatGraphFilePath
6767 CheckExitCode " Generating flat and graphviz dependency graph"
6868
6969 Write-Host " Generating graph image $graphVizFilePath "
7070 $dotFilePath = Join-Path $installBin " graphviz\$graphvizVersion \release\bin\dot.exe"
71- Invoke-Expression " & ` "$dotFilePath ` " -Tpng -o' $graphVizImageFilePath ' ` "$graphVizFilePath `" "
71+ & " $dotFilePath " - Tpng - o" $graphVizImageFilePath " " $graphVizFilePath "
7272 CheckExitCode " Generating graphviz image"
73-
73+
7474 Write-Host " '$graphVizFilePath ', '$flatGraphFilePath ', '$normalGraphFilePath ' and '$graphVizImageFilePath ' created!"
7575}
7676catch {
0 commit comments