[Fixes #3502] Fix: publishOptions: [...] not respected

This commit is contained in:
Ajay Bhargav Baaskaran 2016-07-13 15:09:22 -07:00
parent c748c81a4a
commit dbf7435c3c
4 changed files with 4 additions and 2 deletions

View file

@ -25,7 +25,7 @@
} }
} }
}, },
"publishOptions": "testpublishfile.txt", "publishOptions": [ "testpublishfile.txt", "publishfiles" ],
"frameworks": { "frameworks": {
"netcoreapp1.0": {} "netcoreapp1.0": {}
}, },

View file

@ -40,7 +40,8 @@ namespace Microsoft.DotNet.ProjectModel.Files
var token = rawObject.Value<JToken>(option); var token = rawObject.Value<JToken>(option);
if (token.Type != JTokenType.Object) if (token.Type != JTokenType.Object)
{ {
IncludePatterns = new List<string>(ExtractValues(token)); IncludePatterns = CreateCollection(
sourceBasePath, option, ExtractValues(token), literalPath: false);
} }
else else
{ {

View file

@ -128,6 +128,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
publishCommand.Execute().Should().Pass(); publishCommand.Execute().Should().Pass();
publishCommand.GetOutputDirectory().Should().HaveFile("testpublishfile.txt"); publishCommand.GetOutputDirectory().Should().HaveFile("testpublishfile.txt");
publishCommand.GetOutputDirectory().Should().HaveFile("publishfiles/anotherpublishfile.txt");
} }
[Fact] [Fact]