cpanpm icon indicating copy to clipboard operation
cpanpm copied to clipboard

cpan install exit status

Open melezhik opened this issue 12 years ago • 6 comments

It'd be great if cpan install fails it return exit status <> 0. In automated deploy via chef-client this feature is vital.

melezhik avatar Jun 01 '12 09:06 melezhik

It doesn't already do this? What version are you using? Are you using the script or something else?

briandfoy avatar Apr 18 '13 21:04 briandfoy

This is detailed information:

melezhik@melezhik-PC:~/$ cpan 
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.

cpan[1]> m CPAN
Reading '/home/melezhik/.cpan/Metadata'
  Database was generated on Fri, 19 Apr 2013 00:41:02 GMT
Module id = CPAN
    DESCRIPTION  Perl Archive browse and download
    CPAN_USERID  ANDK (Andreas J. Koenig <[email protected]>)
    CPAN_VERSION 2.00
    CPAN_FILE    A/AN/ANDK/CPAN-2.00.tar.gz
    UPLOAD_DATE  2013-04-12
    DSLIP_STATUS RdpO? (released,developer,perl,object-oriented,)
    MANPAGE      CPAN - query, download and build perl modules from CPAN sites
    INST_FILE    /tmp/lib/perl5/CPAN.pm
    INST_VERSION 2.00


cpan[2]> exit
Terminal does not support GetHistory.
Lockfile removed.
melezhik@melezhik-PC:~/$ cpan Foo::Unknown
Reading '/home/melezhik/.cpan/Metadata'
  Database was generated on Fri, 19 Apr 2013 00:41:02 GMT
Warning: Cannot install Foo::Unknown, don't know what it is.
Try the command

    i /Foo::Unknown/

to find objects with matching identifiers.
melezhik@melezhik-PC:~/$ echo $?
0

melezhik avatar Apr 19 '13 08:04 melezhik

Thanks for that. I thought I had made that work, but I had merely defined the constants for it. I just uploaded App::Cpan 1.61_03 which I think does the trick. It will return non zero for any failure, even if other modules in that run installed just fine.

briandfoy avatar Apr 19 '13 15:04 briandfoy

We can close this issue.

briandfoy avatar Mar 16 '15 00:03 briandfoy

Thanks Brian!

понедельник, 16 марта 2015 г. пользователь brian d foy написал:

We can close this issue.

— Reply to this email directly or view it on GitHub https://github.com/andk/cpanpm/issues/32#issuecomment-81308009.

Отправлено с мобильного устройства

melezhik avatar Mar 16 '15 06:03 melezhik

This issue has been resolved but I don't have the access to close it.

briandfoy avatar Jan 14 '17 03:01 briandfoy