Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Cake.Npm/Exec/NpmExecSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public NpmExecSettings()
/// Arguments to pass to the target script.
/// </summary>
public IList<string> Arguments => arguments;

/// <summary>
/// If the script is installed globally.
/// </summary>
public bool IsGlobal { get; set; }

/// <inheritdoc />
protected override void EvaluateCore(ProcessArgumentBuilder args)
Expand All @@ -43,6 +48,11 @@ protected override void EvaluateCore(ProcessArgumentBuilder args)

args.AppendQuoted(ExecCommand);

if (IsGlobal)
{
args.Append("--global");
}

if (Arguments.Any())
{
args.Append("--");
Expand Down