Skip to content

Commit a8d17f4

Browse files
committed
(maint) Improve output when exporting releases
When exporting releases, if not providing a specific tagName, the output was: Exporting release null Which isn't very helpful. This commit changes this output so that if the tagName is included, include it in the output, if it isn't, assume that all releases are being exported, and output this instead.
1 parent 2325a95 commit a8d17f4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/GitReleaseManager.Core/Commands/ExportCommand.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ public ExportCommand(IVcsService vcsService, ILogger logger)
1818

1919
public async Task<int> ExecuteAsync(ExportSubOptions options)
2020
{
21-
_logger.Information("Exporting release {TagName}", options.TagName);
21+
if (string.IsNullOrEmpty(options.TagName))
22+
{
23+
_logger.Information("Exporting all releases");
24+
}
25+
else
26+
{
27+
_logger.Information("Exporting release {TagName}", options.TagName);
28+
}
29+
2230
var releasesContent = await _vcsService.ExportReleasesAsync(options.RepositoryOwner, options.RepositoryName, options.TagName, options.SkipPrereleases).ConfigureAwait(false);
2331

2432
using (var sw = new StreamWriter(File.Open(options.FileOutputPath, FileMode.OpenOrCreate)))

0 commit comments

Comments
 (0)