Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/Aspire.Hosting/Publishing/Publisher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Task PublishAsync(DistributedApplicationModel model, CancellationToken ca
);
}

var context = new PublishingContext(model, executionContext, serviceProvider, logger, cancellationToken, options.Value.OutputPath);
var context = new PublishingContext(model, executionContext, serviceProvider, logger, cancellationToken, Path.GetFullPath(options.Value.OutputPath));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, relative to what? CWD? I think this is right.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep -- it uses CWD as the base AFAIK. I'll remember to update the tests to check for this as a tack on to a future PR.

return context.WriteModelAsync(model);
}
}
3 changes: 2 additions & 1 deletion tests/Aspire.Hosting.Tests/PublishingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public void PublishCallsPublishingCallback()
Assert.True(context.CancellationToken.CanBeCanceled);
Assert.Equal(DistributedApplicationOperation.Publish, context.ExecutionContext.Operation);
Assert.Equal("default", context.ExecutionContext.PublisherName);
Assert.True(Path.IsPathFullyQualified(context.OutputPath));
publishedCalled = true;
return Task.CompletedTask;
});
Expand All @@ -32,4 +33,4 @@ public void PublishCallsPublishingCallback()

Assert.True(publishedCalled, "Publishing callback was not called.");
}
}
}