Skip to content

Commit ce6047c

Browse files
authored
Merge pull request #887 from fortran-lang/fix-show-package-version
Fix `--show-package-version`
2 parents 25724f4 + 37f7403 commit ce6047c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/fpm/cmd/publish.f90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ subroutine cmd_publish(settings)
3939
if (allocated(error)) call fpm_stop(1, '*cmd_build* Package error: '//error%message)
4040
version = package%version
4141

42+
if (settings%show_package_version) then
43+
print *, version%s(); return
44+
end if
45+
4246
! Build model to obtain dependency tree.
4347
call build_model(model, settings%fpm_build_settings, package, error)
4448
if (allocated(error)) call fpm_stop(1, '*cmd_build* Model error: '//error%message)

0 commit comments

Comments
 (0)