From 440cd42ade4ab71d6f4cf7176748453da82b3ad5 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Sat, 1 Jun 2013 15:59:02 +1200 Subject: [PATCH] -Fixed couple of install.ps1 bugs --- Build/install.ps1 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Build/install.ps1 b/Build/install.ps1 index 64afd1d8..62311ec5 100644 --- a/Build/install.ps1 +++ b/Build/install.ps1 @@ -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) { @@ -75,16 +77,17 @@ try $lines = $lastOperation -split "`r`n" - $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json") } | select -first 1 + $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1 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 } \ No newline at end of file