Skip to content

Commit

Permalink
(cake-buildGH-510) Added WorkingDirectory option for running Chocolatey
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Nov 25, 2015
1 parent e7bfaf3 commit 7c11004
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,10 @@ public sealed class ChocolateyPackSettings : ToolSettings
/// </summary>
/// <value>The allow unofficial flag</value>
public bool AllowUnofficial { get; set; }

/// <summary>
/// Gets or sets a value indicating the Working Directory that should be used while running choco.exe.
/// </summary>
public DirectoryPath WorkingDirectory { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/Cake.Common/Tools/Chocolatey/Pack/ChocolateyPacker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void Pack(ChocolateyPackSettings settings, Func<FilePath> process)
processedNuspecFilePath = process();

// Start the process.
Run(settings, GetArguments(processedNuspecFilePath, settings));
Run(settings, GetArguments(processedNuspecFilePath, settings), new ProcessSettings { WorkingDirectory = settings.WorkingDirectory }, null);
}
finally
{
Expand Down

0 comments on commit 7c11004

Please sign in to comment.