Skip to content
Permalink
Browse files

Fix $*EXECUTABLE path construction after a chdir

Sets the CWD of the $*EXECUTABLE path before it can be changed.

Fixes:
$ install/bin/perl6 -e 'chdir "install"; say $*EXECUTABLE.absolute.perl;'
"/Users/ugexe/.rakudobrew/moar-blead-master/install/install/bin/perl6"
  • Loading branch information...
ugexe committed Jan 12, 2019
1 parent 9485dd2 commit 5c14916bb0217c1897f6ac15bcbd96b05e1da198
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/Process.pm6
@@ -10,7 +10,7 @@ Rakudo::Internals.REGISTER-DYNAMIC: '$*RAKUDO_MODULE_DEBUG', {
}

Rakudo::Internals.REGISTER-DYNAMIC: '$*EXECUTABLE', {
PROCESS::<$EXECUTABLE> := (
PROCESS::<$EXECUTABLE> := IO::Path.new(:CWD(INIT nqp::cwd()),
#?if jvm
$*VM.properties<perl6.execname>
// $*VM.properties<perl6.prefix> ~ '/bin/perl6-j'
@@ -25,7 +25,7 @@ Rakudo::Internals.REGISTER-DYNAMIC: '$*EXECUTABLE', {
// ($*VM.config<prefix> ~ '/bin/'
~ ($*VM.config<osname> eq 'MSWin32' ?? 'perl6-js.bat' !! 'perl6-js'))
#?endif
).IO;
);
}

Rakudo::Internals.REGISTER-DYNAMIC: '$*EXECUTABLE-NAME', {

0 comments on commit 5c14916

Please sign in to comment.
You can’t perform that action at this time.