Skip to content

Commit 64adaf4

Browse files
authored
(GH-108) Raise exception when asset doesn't exist (#182)
(GH-108) Raise exception when asset doesn't exist
2 parents 28cb249 + 64ecf1a commit 64adaf4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Source/GitReleaseManager/GitHubProvider.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,9 @@ public async Task AddAssets(string owner, string repository, string tagName, ILi
211211
{
212212
if (!File.Exists(asset))
213213
{
214-
Logger.WriteWarning(string.Format("Requested asset to be uploaded doesn't exist: {0}", asset));
215-
continue;
214+
var logMessage = string.Format("Requested asset to be uploaded doesn't exist: {0}", asset);
215+
Logger.WriteError(logMessage);
216+
throw new Exception(logMessage);
216217
}
217218

218219
var assetFileName = Path.GetFileName(asset);

0 commit comments

Comments
 (0)