Skip to content

Commit 1715c04

Browse files
authored
Merge pull request #517 from urbanjost/fix_run
Fix run
2 parents bfa3556 + 76589b8 commit 1715c04

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
@@ -416,11 +416,20 @@ subroutine cmd_run(settings,test)
416416
do i=1,size(executables)
417417
if (exists(executables(i)%s)) then
418418
if(settings%runner .ne. ' ')then
419-
call run(settings%runner//' '//executables(i)%s//" "//settings%args, &
419+
if(.not.allocated(settings%args))then
420+
call run(settings%runner//' '//executables(i)%s, &
420421
echo=settings%verbose, exitstat=stat(i))
422+
else
423+
call run(settings%runner//' '//executables(i)%s//" "//settings%args, &
424+
echo=settings%verbose, exitstat=stat(i))
425+
endif
421426
else
422-
call run(executables(i)%s//" "//settings%args,echo=settings%verbose, &
427+
if(.not.allocated(settings%args))then
428+
call run(executables(i)%s,echo=settings%verbose, exitstat=stat(i))
429+
else
430+
call run(executables(i)%s//" "//settings%args,echo=settings%verbose, &
423431
exitstat=stat(i))
432+
endif
424433
endif
425434
else
426435
call fpm_stop(1,'*cmd_run*:'//executables(i)%s//' not found')

0 commit comments

Comments
 (0)