Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix mixed console output on Windows #191

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Tatsuhiko Miyagawa"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 5.039, Dist::Milla version v1.0.15, CPAN::Meta::Converter version 2.150005",
"generated_by" : "Dist::Zilla version 5.047, Dist::Milla version v1.0.15, CPAN::Meta::Converter version 2.150005",
"license" : [
"perl_5"
],
Expand All @@ -15,25 +15,30 @@
"name" : "Carton",
"no_index" : {
"directory" : [
"t",
"xt",
"eg",
"examples",
"inc",
"share",
"eg",
"examples"
"t",
"xt"
]
},
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0",
"version" : "0.77"
},
"suggests" : {
"JSON::PP" : "2.27300"
}
},
"develop" : {
"requires" : {
"Capture::Tiny" : "0",
"Dist::Milla" : "v1.0.15",
"Dist::Zilla" : "0",
"Dist::Zilla::PluginBundle::Milla" : "0",
"Test::More" : "0.9",
"Test::Pod" : "1.41",
"Test::Requires" : "0"
Expand Down Expand Up @@ -65,31 +70,35 @@
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/perl-carton/carton/issues"
"web" : "https://github.com/pplu/carton/issues"
},
"homepage" : "https://github.com/perl-carton/carton",
"homepage" : "https://github.com/pplu/carton",
"repository" : {
"type" : "git",
"url" : "https://github.com/perl-carton/carton.git",
"web" : "https://github.com/perl-carton/carton"
"url" : "https://github.com/pplu/carton.git",
"web" : "https://github.com/pplu/carton"
}
},
"version" : "v1.0.22",
"version" : "v1.1.1",
"x_contributors" : [
"Christian Walde <[email protected]>",
"Christopher Mckay <[email protected]>",
"David Golden <[email protected]>",
"David Steinbrunner <[email protected]>",
"ikasam_a <[email protected]>",
"Jonathan Steinert <[email protected]>",
"Jose Luis Martinez <[email protected]>",
"Kan Fushihara <[email protected]>",
"Masahiro Chiba <[email protected]>",
"NAKAGAWA Masaki <[email protected]>",
"Olaf Alders <[email protected]>",
"Pedro Figueiredo <[email protected]>",
"Pedro Melo <[email protected]>",
"Peter Oliver <[email protected]>",
"shiba_yu36 <[email protected]>",
"Slobodan Mis\u030ckovic\u0301 <[email protected]>",
"Tatsuhiko Miyagawa <[email protected]>",
"Tatsuhiko Miyagawa <[email protected]>",
"WATANABE Hiroaki <[email protected]>",
"Yanick Champoux <[email protected]>"
]
}
Expand Down
4 changes: 2 additions & 2 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.039.
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.047.
use strict;
use warnings;

Expand Down Expand Up @@ -35,7 +35,7 @@ my %WriteMakefileArgs = (
"Try::Tiny" => "0.09",
"parent" => "0.223"
},
"VERSION" => "v1.0.22",
"VERSION" => "v1.1.1",
"test" => {
"TESTS" => "t/*.t"
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ with perl lower than the specified version.

# COMMUNITY

- [https://github.com/miyagawa/carton](https://github.com/miyagawa/carton)
- [https://github.com/perl-carton/carton](https://github.com/perl-carton/carton)

Code repository, Wiki and Issue Tracker

Expand Down
2 changes: 2 additions & 0 deletions cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ on develop => sub {
requires 'Test::More', 0.90;
requires 'Test::Requires';
requires 'Capture::Tiny';
requires 'Dist::Zilla';
requires 'Dist::Zilla::PluginBundle::Milla';
};
2 changes: 1 addition & 1 deletion lib/Carton.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Carton;
use strict;
use 5.008_005;
use version; our $VERSION = version->declare("v1.0.22");
use version; our $VERSION = version->declare("v1.1.1");

1;
__END__
Expand Down
6 changes: 4 additions & 2 deletions lib/Carton/Builder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use Class::Tiny {
cascade => sub { 1 },
without => sub { [] },
cpanfile => undef,
with_test => sub { 0 },
fatscript => sub { $_[0]->_build_fatscript },
};

Expand Down Expand Up @@ -107,8 +108,9 @@ sub _build_fatscript {

sub run_cpanm {
my($self, @args) = @_;
local $ENV{PERL_CPANM_OPT};
!system $^X, $self->fatscript, "--quiet", "--notest", @args;
# allow cpanm options to be set via PERL_CARTON_CPANM_OPT
local $ENV{PERL_CPANM_OPT} = $ENV{PERL_CARTON_CPANM_OPT};
!system $^X, $self->fatscript, "--quiet", ($self->with_test ? () : "--notest"), @args;
}

1;
4 changes: 3 additions & 1 deletion lib/Carton/CLI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use Carton::Error;

use constant { SUCCESS => 0, INFO => 1, WARN => 2, ERROR => 3 };

our $UseSystem = 0; # 1 for unit testing
our $UseSystem = ($^O eq 'MSWin32'); # 1 for unit testing, and for Windows

use Class::Tiny {
verbose => undef,
Expand Down Expand Up @@ -179,6 +179,7 @@ sub cmd_install {
"without=s" => sub { push @without, split /,/, $_[1] },
"deployment!" => \my $deployment,
"cached!" => \my $cached,
"with-test!" => \my $with_test,
);

my $env = Carton::Environment->build($cpanfile_path, $install_path);
Expand All @@ -193,6 +194,7 @@ sub cmd_install {
mirror => $self->mirror,
without => \@without,
cpanfile => $env->cpanfile,
with_test => $with_test,
);

# TODO: --without with no .lock won't fetch the groups, resulting in insufficient requirements
Expand Down
7 changes: 7 additions & 0 deletions lib/Carton/Doc/Install.pod
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,11 @@ to exclude, in the comma separated list.
B<NOTE>: C<--without> for the initial installation (without
cpanfile.snapshot) is not supported at this moment.

=item --with-test

By default, C<carton install> will skip installation of all test dependencies.
This can prove undesirable if running through an automated testing system
This option causes carton to install all test dependencies and run the tests
of all dependencies.

=back