Skip to content

Commit

Permalink
Avoid StringIndexOutOfBoundsException on Windows
Browse files Browse the repository at this point in the history
On the JVM backend, nqp::backendconfig doesn't tell us the OS name.

Unfortunately, 'nmake install' still doesn't work. Another error
surfaces:

  Invalid JSON: VMArray representation does not implement push_native
  • Loading branch information
usev6 committed May 17, 2020
1 parent d8c2650 commit 8e5b610
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/main.nqp
Expand Up @@ -19,12 +19,13 @@ nqp::bindhllsym('Raku', '$COMPILER_CONFIG', $comp.config);


# Determine Perl6 and NQP dirs.
my $config := nqp::backendconfig();
my $sep := $config<osname> eq 'MSWin32' ?? '\\' !! '/';
#?if jvm
my $sep := nqp::atkey(nqp::jvmgetproperties,'os.name') eq 'MSWin32' ?? '\\' !! '/';
my $execname := nqp::atkey(nqp::jvmgetproperties,'perl6.execname');
#?endif
#?if !jvm
my $config := nqp::backendconfig();
my $sep := $config<osname> eq 'MSWin32' ?? '\\' !! '/';
my $execname := nqp::execname();
#?endif
my $install-dir := $execname eq ''
Expand Down
5 changes: 3 additions & 2 deletions src/rakudo-debug.nqp
Expand Up @@ -467,12 +467,13 @@ sub MAIN(*@ARGS) {


# Determine Perl6 and NQP dirs.
my $config := nqp::backendconfig();
my $sep := $config<osname> eq 'MSWin32' ?? '\\' !! '/';
#?if jvm
my $sep := nqp::atkey(nqp::jvmgetproperties,'os.name') eq 'MSWin32' ?? '\\' !! '/';
my $execname := nqp::atkey(nqp::jvmgetproperties,'perl6.execname');
#?endif
#?if !jvm
my $config := nqp::backendconfig();
my $sep := $config<osname> eq 'MSWin32' ?? '\\' !! '/';
my $execname := nqp::execname();
#?endif
my $install-dir := $execname eq ''
Expand Down

0 comments on commit 8e5b610

Please sign in to comment.