Skip to content

Commit

Permalink
Update DownloadRepoCommand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Dec 15, 2024
1 parent 284d718 commit 2c69c80
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Console/DownloadRepoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Revolution\Bluesky\Console;

use GuzzleHttp\Psr7\Utils;
use Illuminate\Console\Command;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Storage;
Expand Down Expand Up @@ -63,7 +64,8 @@ public function handle(): int

$this->warn('DID: '.$did);

$pds = DidDocument::make(Bluesky::identity()->resolveDID($did, cache: false)->json())->pdsUrl();
$didDoc = DidDocument::make(Bluesky::identity()->resolveDID($did, cache: false)->json());
$pds = $didDoc->pdsUrl();

$this->warn('PDS: '.$pds);

Expand All @@ -82,7 +84,7 @@ public function handle(): int

$this->line('Download: '.Storage::path($file));

[$roots, $blocks] = CAR::decode(Storage::get($file));
[$roots, $blocks] = CAR::decode(Utils::streamFor(Storage::readStream($file)));

if (Arr::exists($blocks, $roots[0])) {
$signed_commit = data_get($blocks, $roots[0]);
Expand Down

0 comments on commit 2c69c80

Please sign in to comment.