File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,14 @@ class RepositorySnapshots extends Command
2828 public function handle (): void
2929 {
3030 $ repository = Repository::where ('name ' , $ this ->argument ('repository ' ))->firstOrFail ();
31- $ snapshots = collect (Storage::directories ($ repository ->snapshotDir ()))->map (function ($ snapshot ) use ($ repository ) {
32- return [
33- 'Snapshot ' => basename ($ snapshot ),
34- 'Active ' => $ snapshot === $ repository ->getStablePath () ? 'Yes ' : 'No ' ,
35- ];
36- });
31+ $ snapshots = collect (Storage::directories ($ repository ->snapshotDir ()))
32+ ->sort ()
33+ ->map (function ($ snapshot ) use ($ repository ) {
34+ return [
35+ 'Snapshot ' => basename ($ snapshot ),
36+ 'Active ' => $ snapshot === $ repository ->getStablePath () ? 'Yes ' : 'No ' ,
37+ ];
38+ });
3739 $ this ->table (['Snapshot ' , 'Active ' ], $ snapshots );
3840 }
3941}
You can’t perform that action at this time.
0 commit comments