small improvement to not add the path if it's on the path already

This commit is contained in:
dovholuknf
2021-11-08 14:28:17 -05:00
parent a324b27d25
commit 16d21ce903
+3 -1
View File
@@ -23,7 +23,9 @@ if($(Test-Path -Path $zipFile -PathType Leaf)) {
Expand-Archive -Path $zipFile -DestinationPath "${toDir}\${version}" -ErrorAction SilentlyContinue
$env:Path+=";${toDir}\${version}\ziti\"
if(! $env:Path.Contains("${toDir}\${version}\ziti\")){
$env:Path+=";${toDir}\${version}\ziti\"
}