Skip to content

Commit

Permalink
Corrected condition for check value in itemPattern (#3732)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-tikhomirov authored Feb 3, 2022
1 parent b698b29 commit 0940cd3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Agent.Plugins/BuildArtifact/BuildArtifactPluginV1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected override async Task ProcessCommandInternalAsync(
targetPath = Path.IsPathFullyQualified(targetPath) ? targetPath : Path.GetFullPath(Path.Combine(defaultWorkingDirectory, targetPath));

// Empty input field "Matching pattern" must be recognised as default value '**'
itemPattern = itemPattern.Length == 0 ? "**" : itemPattern;
itemPattern = string.IsNullOrEmpty(itemPattern) ? "**" : itemPattern;

string[] minimatchPatterns = itemPattern.Split(
new[] { "\n" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ protected override async Task ProcessCommandInternalAsync(
string userSpecifiedpipelineId = context.GetInput(PipelineId, required: false);

// Empty input field "Matching pattern" must be recognised as default value '**'
itemPattern = itemPattern.Length == 0 ? "**" : itemPattern;
itemPattern = string.IsNullOrEmpty(itemPattern) ? "**" : itemPattern;

string[] minimatchPatterns = itemPattern.Split(
new[] { "\n" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected override async Task ProcessCommandInternalAsync(
context.Debug($"ArtifactName: {artifactName}");

// Empty input field "Matching pattern" must be recognised as default value '**'
itemPattern = itemPattern.Length == 0 ? "**" : itemPattern;
itemPattern = string.IsNullOrEmpty(itemPattern) ? "**" : itemPattern;

string[] minimatchPatterns = itemPattern.Split(
new[] { "\n" },
Expand Down

0 comments on commit 0940cd3

Please sign in to comment.