Changes to publish
- Return error for invalid runtime ids - Change output to be rid specific
This commit is contained in:
parent
9350db24be
commit
3876d2e16a
1 changed files with 8 additions and 1 deletions
|
@ -49,6 +49,13 @@ namespace Microsoft.DotNet.Tools.Publish
|
|||
var fx = NuGetFramework.Parse(framework.Value());
|
||||
var rids = new[] { runtime.Value() };
|
||||
var context = ProjectContext.Create(path, fx, rids);
|
||||
|
||||
if (string.IsNullOrEmpty(context.RuntimeIdentifier))
|
||||
{
|
||||
Reporter.Output.WriteLine($"Unknown runtime identifier {runtime.Value()}.".Red());
|
||||
return 1;
|
||||
}
|
||||
|
||||
return Publish(context, output.Value(), configuration.Value() ?? Constants.DefaultConfiguration);
|
||||
});
|
||||
|
||||
|
@ -97,7 +104,7 @@ namespace Microsoft.DotNet.Tools.Publish
|
|||
Constants.BinDirectoryName,
|
||||
configuration,
|
||||
context.TargetFramework.GetTwoDigitShortFolderName(),
|
||||
"publish");
|
||||
context.RuntimeIdentifier);
|
||||
}
|
||||
|
||||
if (!Directory.Exists(outputPath))
|
||||
|
|
Loading…
Add table
Reference in a new issue