Skip to content

Commit 6acab10

Browse files
The127claude
andcommitted
refactor: return the program from the loop in emulator.ready
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: karo <karolin.kostial@gmail.com>
1 parent 422642b commit 6acab10

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

‎internal/emulator/ready.go‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,9 @@ func ready(ctx context.Context, store *download.Store, pin download.Pin, target
4646
wanted := programs[target]
4747
files, failed := deb.Files(pkg)
4848
for name, file := range files {
49-
if name != wanted {
50-
continue
49+
if name == wanted {
50+
return io.ReadAll(file)
5151
}
52-
53-
program, err := io.ReadAll(file)
54-
if err != nil {
55-
return nil, err
56-
}
57-
58-
return program, nil
5952
}
6053

6154
if err := failed(); err != nil {

0 commit comments

Comments
 (0)