-Fixed couple of install.ps1 bugs
This commit is contained in:
+8
-5
@@ -1,5 +1,8 @@
|
||||
param($installPath, $toolsPath, $package, $project)
|
||||
|
||||
# open json.net splash page on package install
|
||||
# don't open if json.net is installed as a dependency
|
||||
|
||||
# yolo
|
||||
|
||||
try
|
||||
@@ -33,7 +36,7 @@ try
|
||||
$lastCommand = $lastCommand.Trim().ToLower()
|
||||
if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json"))
|
||||
{
|
||||
$dte2.ItemOperations.Navigate($url)
|
||||
$dte2.ItemOperations.Navigate($url) | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,8 +69,7 @@ try
|
||||
|
||||
$operations = $messages -split "=============================="
|
||||
|
||||
# second to last
|
||||
$lastOperation = $operations | select -last 2 | select -first 1
|
||||
$lastOperation = $operations | select -last 1
|
||||
|
||||
if ($lastOperation)
|
||||
{
|
||||
@@ -79,12 +81,13 @@ try
|
||||
|
||||
if ($installMatch)
|
||||
{
|
||||
$dte2.ItemOperations.Navigate($url)
|
||||
$dte2.ItemOperations.Navigate($url) | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
# prevent potental errors from bubbling up
|
||||
# stop potential errors from bubbling up
|
||||
# worst case the splash page won't open
|
||||
}
|
||||
Reference in New Issue
Block a user