Skip to content

Commit

Permalink
Allow publishing to complete for an existing release with --force (#1130
Browse files Browse the repository at this point in the history
)

* Honor the --force option when publishing a crate (#1083)

When publishing and checking for existing crate with same version,
if the crate already exist and the force option is used,
emit a warning message and continue.

* Use Recoverable_Error to report that a crate version already exists
  • Loading branch information
stcarrez authored Aug 3, 2022
1 parent 3e561be commit 0b53af4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/alire/alire-publish.adb
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ package body Alire.Publish is

Index_On_Disk.Loading.Load_All (Strict => True).Assert;
if Index.Exists (Release.Name, Release.Version) then
Raise_Checked_Error
("Target release " & Release.Milestone.TTY_Image
& " already exist in a loaded index");
Recoverable_Error
("Target release " & Release.Milestone.TTY_Image
& " already exist in a loaded index");
end if;

-- Present release information to user
Expand Down

0 comments on commit 0b53af4

Please sign in to comment.