File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -506,6 +506,7 @@ end subroutine cmd_run
506
506
subroutine cmd_clean (settings )
507
507
class(fpm_clean_settings), intent (in ) :: settings
508
508
character (len= 1 ) :: response
509
+ write (stdout, ' (*(a))' ) " fpm: Clean calling directory '" // settings% calling_dir// " '"
509
510
if (is_dir(" build" )) then
510
511
write (stdout, ' (A)' , advance= ' no' ) " Delete the build directory (y/n)? "
511
512
read (stdin, ' (A1)' ) response
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ module fpm_command_line
106
106
end type
107
107
108
108
type, extends(fpm_cmd_settings) :: fpm_clean_settings
109
- logical :: unix
109
+ logical :: unix ! is the system os unix?
110
+ character (len= :), allocatable :: calling_dir ! directory clean called from
110
111
end type
111
112
112
113
character (len= :),allocatable :: name
@@ -481,6 +482,7 @@ subroutine get_command_line_settings(cmd_settings)
481
482
if (lget(' list' ))then
482
483
call printhelp(help_list_dash)
483
484
endif
485
+
484
486
case (' test' )
485
487
call set_args(common_args // compiler_args // run_args // ' --' , &
486
488
help_test,version_text)
@@ -543,7 +545,8 @@ subroutine get_command_line_settings(cmd_settings)
543
545
case (' clean' )
544
546
call set_args(common_args, help_clean)
545
547
allocate (fpm_clean_settings :: cmd_settings)
546
- cmd_settings= fpm_clean_settings(unix= unix)
548
+ call get_current_directory(working_dir, error)
549
+ cmd_settings= fpm_clean_settings(unix= unix, calling_dir= working_dir)
547
550
548
551
case default
549
552
You can’t perform that action at this time.
0 commit comments