Skip to content

Commit

Permalink
Ensure gh token is retrieved before submission steps (#1581)
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo authored Feb 26, 2024
1 parent 1af821a commit 64f73f3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/alire/alire-publish-submit.adb
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,20 @@ package body Alire.Publish.Submit is
---------------

procedure Fork (Context : in out Data) is
use type UString;
begin
if not Ask_To_Fork (Context) then
Raise_Checked_Error
("Cannot continue with automatic submission");
end if;

-- If the fork already existed, the token wouldn't have been needed up
-- to this point, so now we make sure it is informed for next steps.

if Context.Token = "" then
Context.Token := +Ask_For_Token
("to create a submission to the community index on your behalf");
end if;
end Fork;

-----------
Expand Down

0 comments on commit 64f73f3

Please sign in to comment.