File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -687,7 +687,7 @@ subroutine cmd_clean(settings)
687
687
688
688
if (is_dir(' build' )) then
689
689
! Remove the entire build directory
690
- if (settings% clean_call ) then
690
+ if (settings% clean_all ) then
691
691
call os_delete_dir(os_is_unix(), ' build' ); return
692
692
end if
693
693
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ module fpm_command_line
113
113
114
114
type, extends(fpm_cmd_settings) :: fpm_clean_settings
115
115
logical :: clean_skip = .false.
116
- logical :: clean_call = .false.
116
+ logical :: clean_all = .false.
117
117
end type
118
118
119
119
type, extends(fpm_build_settings) :: fpm_publish_settings
@@ -606,11 +606,22 @@ subroutine get_command_line_settings(cmd_settings)
606
606
& ' --skip' // &
607
607
& ' --all' , &
608
608
help_clean, version_text)
609
- allocate (fpm_clean_settings :: cmd_settings)
610
- call get_current_directory(working_dir, error)
611
- cmd_settings= fpm_clean_settings( &
612
- & clean_skip= lget(' skip' ), &
613
- & clean_call= lget(' all' ))
609
+
610
+ block
611
+ logical :: skip, clean_all
612
+
613
+ skip = lget(' skip' )
614
+ clean_all = lget(' all' )
615
+
616
+ if (all ([skip, clean_all])) then
617
+ call fpm_stop(6 , ' Do not specify both --skip and --all options on the clean subcommand.' )
618
+ end if
619
+
620
+ allocate (fpm_clean_settings :: cmd_settings)
621
+ cmd_settings= fpm_clean_settings( &
622
+ & clean_skip= skip, &
623
+ & clean_all= clean_all)
624
+ end block
614
625
615
626
case (' publish' )
616
627
call set_args(common_args // compiler_args // ' &
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ subroutine parse()
264
264
if (allocated (settings% args)) act_args= settings% args
265
265
type is (fpm_clean_settings)
266
266
act_c_s= settings% clean_skip
267
- act_c_a= settings% clean_call
267
+ act_c_a= settings% clean_all
268
268
type is (fpm_install_settings)
269
269
type is (fpm_publish_settings)
270
270
act_show_v= settings% show_package_version
@@ -275,7 +275,6 @@ subroutine parse()
275
275
276
276
open (file= ' _test_cli' ,newunit= lun,delim= ' quote' )
277
277
write (lun,nml= act_cli,delim= ' quote' )
278
- ! !write(*,nml=act_cli)
279
278
close (unit= lun)
280
279
281
280
end subroutine parse
You can’t perform that action at this time.
0 commit comments