Skip to content

Commit 76589b8

Browse files
committed
settings%args was used unallocated
1 parent 117690d commit 76589b8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/fpm.f90

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,20 @@ subroutine cmd_run(settings,test)
423423
do i=1,size(executables)
424424
if (exists(executables(i)%s)) then
425425
if(settings%runner .ne. ' ')then
426-
call run(settings%runner//' '//executables(i)%s//" "//settings%args, &
426+
if(.not.allocated(settings%args))then
427+
call run(settings%runner//' '//executables(i)%s, &
427428
echo=settings%verbose, exitstat=stat(i))
429+
else
430+
call run(settings%runner//' '//executables(i)%s//" "//settings%args, &
431+
echo=settings%verbose, exitstat=stat(i))
432+
endif
428433
else
429-
call run(executables(i)%s//" "//settings%args,echo=settings%verbose, &
434+
if(.not.allocated(settings%args))then
435+
call run(executables(i)%s,echo=settings%verbose, exitstat=stat(i))
436+
else
437+
call run(executables(i)%s//" "//settings%args,echo=settings%verbose, &
430438
exitstat=stat(i))
439+
endif
431440
endif
432441
else
433442
write(stderr,*)'fpm::run<ERROR>',executables(i)%s,' not found'

0 commit comments

Comments
 (0)