Skip to content

Commit f8ba766

Browse files
committed
Avoid undocumented worktree shape access
1 parent 4f8ffda commit f8ba766

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

inc/Abilities/WorkspaceAbilities.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3470,9 +3470,8 @@ private static function hasLocalPrimaryCheckout( Workspace $workspace, string $r
34703470
return false;
34713471
}
34723472

3473-
$path = (string) ( $result['path'] ?? '' );
3474-
$is_worktree = (bool) ( $result['is_worktree'] ?? false );
3475-
return ! $is_worktree && '' !== $path && ! str_starts_with($path, 'github://');
3473+
$path = (string) ( $result['path'] ?? '' );
3474+
return '' !== $path && ! str_starts_with($path, 'github://') && ! str_contains(basename($path), '@');
34763475
}
34773476

34783477
/**

0 commit comments

Comments
 (0)