diff --git a/src/fpm/git.f90 b/src/fpm/git.f90 index c007743a90..1ccaf8eebb 100644 --- a/src/fpm/git.f90 +++ b/src/fpm/git.f90 @@ -333,7 +333,13 @@ subroutine git_archive(source, destination, ref, verbose, error) call fatal_error(error, "Cannot find a suitable archive format for 'git archive'."); return end if - call run('git archive '//ref//' --format='//archive_format//' -o '//destination, echo=verbose, exitstat=stat) + call run('fpm build --dump fpm_model.json', echo=verbose, exitstat=stat) + call run('git archive ' & + // ref // & + ' --format=' // archive_format // & + ' -o ' // destination // & + ' --add-file=fpm_model.json', echo=verbose, exitstat=stat) + call run('rm fpm_model.json', echo=verbose, exitstat=stat) if (stat /= 0) then call fatal_error(error, "Error packing '"//source//"'."); return end if