-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0003-Use-correct-exclude-filer-on-unix.patch
35 lines (29 loc) · 1.66 KB
/
0003-Use-correct-exclude-filer-on-unix.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From b7e6f01ab6e1aa114e89c849610ad4690304e5c4 Mon Sep 17 00:00:00 2001
From: AdmiringWorm <kim.nordmo@gmail.com>
Date: Fri, 5 Mar 2021 17:12:26 +0100
Subject: [PATCH 3/3] Use correct exclude filer on unix
---
src/chocolatey/infrastructure.app/nuget/NugetPack.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/chocolatey/infrastructure.app/nuget/NugetPack.cs b/src/chocolatey/infrastructure.app/nuget/NugetPack.cs
index 0d80b69c..14e89a53 100644
--- a/src/chocolatey/infrastructure.app/nuget/NugetPack.cs
+++ b/src/chocolatey/infrastructure.app/nuget/NugetPack.cs
@@ -22,6 +22,7 @@ namespace chocolatey.infrastructure.app.nuget
using System.Linq;
using NuGet;
using IFileSystem = filesystem.IFileSystem;
+ using chocolatey.infrastructure.platforms;
// ReSharper disable InconsistentNaming
@@ -56,8 +57,9 @@ namespace chocolatey.infrastructure.app.nuget
// Always exclude the nuspec file
// Review: This exclusion should be done by the package builder because it knows which file would collide with the auto-generated
// manifest file.
+ var filter = Platform.get_platform() == PlatformType.Windows ? @"**\*" : "**/*";
var excludes = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
- var wildCards = excludes.Concat(new[] {@"**\*" + Constants.ManifestExtension, @"**\*" + Constants.PackageExtension});
+ var wildCards = excludes.Concat(new[] { filter + Constants.ManifestExtension, filter + Constants.PackageExtension });
PathResolver.FilterPackageFiles(packageFiles, ResolvePath, wildCards);
}
--
2.30.1