Skip to content

Commit 819fbd1

Browse files
committed
feat: add logs
1 parent 5c4ab37 commit 819fbd1

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

container-uploader/app.mjs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,22 @@ const buildDockerImage = async (
4343
console.log("docker logging in!");
4444
childProcess.execSync(cmdLogin);
4545
console.log("docker logged in!");
46-
childProcess.execSync(`docker push ${tag}`);
46+
try {
47+
const result = childProcess.execSync(`docker push ${tag}`, {
48+
stdio: 'pipe'
49+
});
50+
console.log('Docker push output:', result.toString());
51+
} catch (err) {
52+
console.error('Docker push failed!');
53+
54+
if (err.stdout) {
55+
console.error('stdout:', err.stdout.toString());
56+
}
57+
58+
if (err.stderr) {
59+
console.error('stderr:', err.stderr.toString());
60+
}
61+
}
4762
console.log("image pushed!");
4863
};
4964

@@ -119,7 +134,7 @@ const runtimeFromRuntimeId = (manifest, runtimeId) => {
119134
const runtime = manifest.find(r => {
120135
return r.path === runtimeId;
121136
});
122-
if(!runtime) {
137+
if (!runtime) {
123138
throw "cound not find the runtime"
124139
}
125140
console.log(runtime);

0 commit comments

Comments
 (0)