Skip to content

Commit

Permalink
[#22]: Fix autodetect arch for apple m1 cpu
Browse files Browse the repository at this point in the history
[#22]: Fix autodetect arch for apple m1 cpu
  • Loading branch information
rustatian authored Nov 2, 2021
2 parents 4e805b5 + 58bb05f commit 1364e26
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Environment/Architecture.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ final class Architecture
* @var string
*/
public const ARCH_X86_64 = 'amd64';
/**
* @var string
*/
public const ARCH_ARM_64 = 'arm64';

/**
* @return ArchitectureType
Expand Down
2 changes: 2 additions & 0 deletions src/Environment/Architecture/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class Factory
'x86',
'x64',
'x86_64',
],
Architecture::ARCH_ARM_64 => [
'arm64',
'aarch64',
],
Expand Down
4 changes: 4 additions & 0 deletions src/GetBinaryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public function execute(InputInterface $input, OutputInterface $output): int
' Downloading...'
);

if ($output->isVerbose()) {
$output->writeln(\sprintf(" -- <info>%s</info>", $asset->getName()));
}

// Install rr binary
$file = $this->installBinary($target, $release, $asset, $io, $output);

Expand Down

0 comments on commit 1364e26

Please sign in to comment.