Skip to content

Commit

Permalink
RAKUDO_HOME env var should override a static Rakudo home
Browse files Browse the repository at this point in the history
So one can still influence the Rakudo home even with non-relocatable Rakudo
builds.

This fixes rakudo#2815
  • Loading branch information
patrickbkr committed Jul 17, 2020
1 parent 1a0be01 commit d563072
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Perl6/Compiler.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ class Perl6::Compiler is HLL::Compiler {
?? self.config<prefix>
!! nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1));

$!rakudo-home := self.config<static-rakudo-home>
|| nqp::getenvhash()<RAKUDO_HOME>
$!rakudo-home := nqp::getenvhash()<RAKUDO_HOME>
// nqp::getenvhash()<PERL6_HOME>
// $install-dir ~ '/share/perl6';
// self.config<static-rakudo-home>
|| $install-dir ~ '/share/perl6';
if nqp::substr($!rakudo-home, nqp::chars($!rakudo-home) - 1) eq $sep {
$!rakudo-home := nqp::substr($!rakudo-home, 0, nqp::chars($!rakudo-home) - 1);
}
Expand Down

0 comments on commit d563072

Please sign in to comment.