Subject: | No status checking in "make ci" |
In my system there is neither "ci" nor "rcs" programs installed:
Show quoted text
> $ ci
> bash: ci: command not found
>
> $ rcs
> bash: rcs: command not found
But "make ci" exits with zero status (which means success):
Show quoted text> $ module-starter --module Foo --author author --email email@example.com
> Added to MANIFEST: Changes
> Added to MANIFEST: ignore.txt
> Added to MANIFEST: lib/Foo.pm
> Added to MANIFEST: Makefile.PL
> Added to MANIFEST: MANIFEST
> Added to MANIFEST: README
> Added to MANIFEST: t/00-load.t
> Added to MANIFEST: t/boilerplate.t
> Added to MANIFEST: t/manifest.t
> Added to MANIFEST: t/pod-coverage.t
> Added to MANIFEST: t/pod.t
> Created starter directories and files
>
> $ cd Foo/
>
> $ perl Makefile.PL
> Checking if your kit is complete...
> Looks good
> Generating a Unix-style Makefile
> Writing Makefile for Foo
> Writing MYMETA.yml and MYMETA.json
>
> $ make ci; echo $?
> /usr/bin/perl "-MExtUtils::Manifest=maniread" \
> -e "@all = keys %{ maniread() };" \
> -e "print(qq{Executing ci -u @all\n}); system(qq{ci -u @all});" \
> -e "print(qq{Executing rcs -Nv0_01: -q ...\n}); system(qq{rcs -Nv0_01: -q @all});"
> Executing ci -u Changes t/00-load.t lib/Foo.pm README Makefile.PL t/pod.t t/pod-coverage.t t/manifest.t MANIFEST
> Executing rcs -Nv0_01: -q ...
> 0
That's wrong. Errors should not be silently discarded. User should see an error message and make should exit with non-zero status.
Such behaviour caused by following Makefile section:
Show quoted text> # --- MakeMaker dist_ci section:
>
> ci :
> $(PERLRUN) "-MExtUtils::Manifest=maniread" \
> -e "@all = keys %{ maniread() };" \
> -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
> -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
"system" fails silently because its return value is not checked.
I tried to add "-Mautodie=:all" after "$(PERLRUN)", it works well to me:
Show quoted text> $ make ci; echo $?
> /usr/bin/perl "-Mautodie=:all" "-MExtUtils::Manifest=maniread" \
> -e "@all = keys %{ maniread() };" \
> -e "print(qq{Executing ci -u @all\n}); system(qq{ci -u @all});" \
> -e "print(qq{Executing rcs -Nv0_01: -q ...\n}); system(qq{rcs -Nv0_01: -q @all});"
> Executing ci -u t/pod-coverage.t t/00-load.t t/manifest.t Changes lib/Foo.pm README Makefile.PL MANIFEST t/pod.t
> "ci -u t/pod-coverage.t t/00-load.t t/manifest.t Changes lib/Foo.pm README Makefile.PL MANIFEST t/pod.t" failed to start: "No such file or directory" at (eval 8) line 12.
> at -e line 2
> Makefile:637: recipe for target 'ci' failed
> make: *** [ci] Error 255
> 2