Skip to content

Commit b33cacb

Browse files
committed
chore: this code hurt me to read
1 parent da98b4b commit b33cacb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/analyzer/image-inspector.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ async function pullWithDockerBinary(
4848
password: string | undefined,
4949
platform: string | undefined,
5050
): Promise<boolean> {
51-
let pullAndSaveSuccessful = false;
5251
try {
5352
if (username || password) {
5453
debug(
@@ -57,13 +56,13 @@ async function pullWithDockerBinary(
5756
}
5857
await docker.pullCli(targetImage, { platform });
5958
await docker.save(targetImage, saveLocation);
60-
return (pullAndSaveSuccessful = true);
59+
return true;
6160
} catch (err) {
6261
debug(`couldn't pull ${targetImage} using docker binary: ${err.message}`);
6362

6463
handleDockerPullError(err.stderr, platform);
6564

66-
return pullAndSaveSuccessful;
65+
return false;
6766
}
6867
}
6968

0 commit comments

Comments
 (0)