Skip to content

Commit

Permalink
Merge pull request #2 from demeritcowboy/windows-newlines
Browse files Browse the repository at this point in the history
Don't crash on windows
  • Loading branch information
totten authored Sep 22, 2020
2 parents 2f69257 + 45382dc commit 7d4a89f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Subscriber/PhpSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public static function runTask(CompileTaskEvent $event)
throw new \RuntimeException("CompilePlugin: Failed to locate autoload.php");
}
$cmd = '@php -r ' . escapeshellarg(sprintf(
'require_once %s; %s(%s);',
'require_once %s; %s(json_decode(base64_decode(%s), 1));',
var_export($autoload, 1),
$event->getTask()->definition['php-method'],
var_export($event->getTask()->definition, 1)
var_export(base64_encode(json_encode($event->getTask()->definition)), 1)
));

$r = new ShellRunner($event->getComposer(), $event->getIO());
Expand Down

0 comments on commit 7d4a89f

Please sign in to comment.