-
Notifications
You must be signed in to change notification settings - Fork 216
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
Nixos (and others) compatibility #801
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2881,7 +2881,9 @@ __perlbrew_purify () { | |
__perlbrew_set_path () { | ||
export MANPATH=${PERLBREW_MANPATH:-}${PERLBREW_MANPATH:+:}$(__perlbrew_purify "$(manpath 2>/dev/null)") | ||
export PATH=${PERLBREW_PATH:-$PERLBREW_ROOT/bin}:$(__perlbrew_purify "$PATH") | ||
hash -r | ||
if [ -o hashall ] ; then | ||
hash -r | ||
fi | ||
Comment on lines
+2887
to
+2889
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A very nice little detail that I've been missing... thanks for adding this! |
||
} | ||
|
||
__perlbrew_set_env() { | ||
|
@@ -3431,6 +3433,11 @@ As a result, different users on the same machine can all share the same perlbrew | |
root directory (although only original user that made the installation would | ||
have the permission to perform perl installations.) | ||
|
||
If you need to install perlbrew using a Perl that isn't either C</usr/bin/perl> | ||
or C</usr/local/bin/perl>, set and export the environment variable | ||
C<PERLBREW_SYSTEM_PERL> and then install as described above. Note that you | ||
must not use a perlbrew-managed perl. | ||
|
||
You may also install perlbrew from CPAN: | ||
|
||
cpan App::perlbrew | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env perl | ||
use strict; | ||
use warnings; | ||
|
||
use FindBin; | ||
use lib $FindBin::Bin; | ||
use App::perlbrew; | ||
require 'test_helpers.pl'; | ||
|
||
use Test::More; | ||
use Capture::Tiny qw( capture_stderr ); | ||
use File::Which qw( which ); | ||
|
||
note "PERLBREW_ROOT set to $ENV{PERLBREW_ROOT}"; | ||
|
||
subtest "Works without error output on bash where hashing is off", sub { | ||
my $bash = which("bash"); | ||
if (!defined($bash)) { | ||
plan skip_all => "Bash executable not found, skipping this test."; | ||
return; | ||
} | ||
|
||
my $app = App::perlbrew->new('self-install'); | ||
$app->current_shell("bash"); | ||
$app->run; | ||
|
||
my $ret; | ||
my $out = capture_stderr { | ||
my $bash_init = file($ENV{PERLBREW_ROOT}, "etc", "bashrc"); | ||
system("ls $ENV{PERLBREW_ROOT}/etc/bashrc"); | ||
$ret = system($bash, "+h", "-c", "source $bash_init"); | ||
}; | ||
is($out, "", "No error messages in output"); | ||
is($ret, 0, "Return value proper"); | ||
}; | ||
|
||
|
||
done_testing; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not look like
Test::Which
is directly used in the new test, we can probably remove this change.Actually I pretty much just depend on
mbtiny
to generate META.json / META.yml for me these days...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting... CI failed at missing Test::Switch. I guess I'll need to tweak how I use mbtiny a little bit to accommodate this addition.