not add to path if added
@@ -77,8 +77,12 @@ try{
Expand-Archive "$installdir\temp.zip" "$installdir\temp" -Force
Move-Item "$installdir\temp\xmake-$branch\xmake\*" $installdir
Remove-Item "$installdir\temp","$installdir\temp.zip" -Recurse -Force
+ try{
+ xmake --version | Out-Null
+ }catch{
$env:Path+=";$installdir"
- [Environment]::SetEnvironmentVariable("Path",[Environment]::GetEnvironmentVariable("Path",[System.EnvironmentVariableTarget]::User)+";$installdir",[System.EnvironmentVariableTarget]::User) # this step is optional because installer writes path to regedit
+ [Environment]::SetEnvironmentVariable("Path",[Environment]::GetEnvironmentVariable("Path",[System.EnvironmentVariableTarget]::User)+";$installdir",[System.EnvironmentVariableTarget]::User)
+ }
xmake --version
}catch{
writeErrorTip 'Error!'
