Skip to content

Commit

Permalink
Allow bower to always launch from root
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjornej committed May 7, 2014
1 parent 862207e commit 989b97e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions GruntLauncher/GruntLauncherPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ private void UpdateBower(object sender, EventArgs e)
if (isParent)
{
button.Text = "Update Bower Packages";
RunProcess(button, " /c \"bower update 2>&1 \" ");
RunProcess(button, " /c \"bower update 2>&1 \" ",true);
}
else if (isChild)
{
string bowerPackage = new DirectoryInfo(path).Name;
RunProcess(button, " /c \"bower update " + bowerPackage + " 2>&1 \" ");
RunProcess(button, " /c \"bower update " + bowerPackage + " 2>&1 \" ",true);
}
}

Expand Down Expand Up @@ -330,7 +330,7 @@ private void MenuItemCallback(object sender, EventArgs e)
if (!cmd.Checked)
{
// launches the grunt process and redirects the output to the output window
RunProcess(cmd, " /c \"grunt --no-color " + task + " 2>&1 \" ");
RunProcess(cmd, " /c \"grunt --no-color " + task + " 2>&1 \" ",false);
}
else
{
Expand Down Expand Up @@ -361,7 +361,7 @@ private void GulpCallback(object sender, EventArgs e)
if (!cmd.Checked)
{
// launches the grunt process and redirects the output to the output window
RunProcess(cmd, " /c \"gulp --no-color " + task + " 2>&1 \" ");
RunProcess(cmd, " /c \"gulp --no-color " + task + " 2>&1 \" ",false);
}
else
{
Expand All @@ -370,7 +370,7 @@ private void GulpCallback(object sender, EventArgs e)
}


private static void RunProcess(OleMenuCommand cmd, string argument)
private static void RunProcess(OleMenuCommand cmd, string argument, bool fromRoot)
{
dte.StatusBar.Animate(true, vsStatusAnimation.vsStatusAnimationBuild);

Expand All @@ -382,7 +382,7 @@ private static void RunProcess(OleMenuCommand cmd, string argument)
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true,
WorkingDirectory = Path.GetDirectoryName( SolutionHelpers.GetSourceFilePath()),
WorkingDirectory = fromRoot? SolutionHelpers.GetRootFolder(dte) : Path.GetDirectoryName( SolutionHelpers.GetSourceFilePath()),
FileName = "cmd",
Arguments = argument,
};
Expand Down

0 comments on commit 989b97e

Please sign in to comment.