Skip to content

Commit c3823ce

Browse files
committed
Check for non-empty token
1 parent 2f2e471 commit c3823ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/fpm/cmd/publish.f90

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ subroutine cmd_publish(settings)
8282
end if
8383

8484
! Make sure a token is provided for publishing.
85-
if (.not. allocated(settings%token)) call fpm_stop(1, 'No token provided.')
85+
if (allocated(settings%token)) then
86+
if (settings%token == '') call fpm_stop(1, 'No token provided.')
87+
else
88+
call fpm_stop(1, 'No token provided.')
89+
end if
8690

8791
call downloader%upload_form(official_registry_base_url//'/packages', upload_data, error)
8892
if (allocated(error)) call fpm_stop(1, '*cmd_publish* Upload error: '//error%message)

0 commit comments

Comments
 (0)