Skip to content

Commit 756022c

Browse files
committed
fix: M_CLI2 silently exits if dump not specified
1 parent 09dfcbf commit 756022c

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/fpm_command_line.f90

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ subroutine get_command_line_settings(cmd_settings)
279279
! not starting with dash
280280
CLI_RESPONSE_FILE=.true.
281281
cmdarg = get_subcommand()
282-
282+
283283
common_args = &
284284
' --directory:C " "' // &
285285
' --verbose F'
@@ -579,10 +579,10 @@ subroutine get_command_line_settings(cmd_settings)
579579
allocate(fpm_test_settings :: cmd_settings)
580580
val_runner=sget('runner')
581581
if(specified('runner') .and. val_runner=='')val_runner='echo'
582-
582+
583583
select type (cmd => cmd_settings)
584584
type is (fpm_test_settings)
585-
585+
586586
call build_settings(cmd, list=lget('list'), build_tests=.true., &
587587
config_file=sget('config-file'))
588588

@@ -591,9 +591,9 @@ subroutine get_command_line_settings(cmd_settings)
591591
cmd%name = names
592592
cmd%runner = val_runner
593593
cmd%runner_args = val_runner_args
594-
594+
595595
end select
596-
596+
597597
case('update')
598598
call set_args(common_args // '&
599599
& --fetch-only F &
@@ -1576,8 +1576,12 @@ subroutine build_settings(self, list, show_model, build_tests, config_file)
15761576
arch = sget('archiver')
15771577

15781578
! Handle --dump default (empty value means use 'fpm_model.toml')
1579-
dump = sget('dump')
1580-
if (specified('dump') .and. dump=='') dump = 'fpm_model.toml'
1579+
if (specified('dump')) then
1580+
dump = sget('dump')
1581+
if (dump=='') dump='fpm_model.toml'
1582+
else
1583+
dump = ''
1584+
endif
15811585

15821586
if (present(config_file)) then
15831587
if (len_trim(config_file) > 0) then
@@ -1588,7 +1592,7 @@ subroutine build_settings(self, list, show_model, build_tests, config_file)
15881592
else
15891593
cfg = sget('config-file')
15901594
end if
1591-
1595+
15921596
! Assign into this (polymorphic) object; allocatable chars auto-allocate
15931597
self%profile = prof
15941598
self%prune = .not. lget('no-prune')

0 commit comments

Comments
 (0)