mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #277 from Dokploy/refactor/spawn-async
refactor: add error message in error builder
This commit is contained in:
@@ -58,7 +58,7 @@ Compose Type: ${composeType} ✅`;
|
|||||||
|
|
||||||
writeStream.write("Docker Compose Deployed: ✅");
|
writeStream.write("Docker Compose Deployed: ✅");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
writeStream.write(`ERROR: ${error}: ❌`);
|
writeStream.write("Error ❌");
|
||||||
throw error;
|
throw error;
|
||||||
} finally {
|
} finally {
|
||||||
writeStream.end();
|
writeStream.end();
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const buildApplication = async (
|
|||||||
await mechanizeDockerContainer(application);
|
await mechanizeDockerContainer(application);
|
||||||
writeStream.write("Docker Deployed: ✅");
|
writeStream.write("Docker Deployed: ✅");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
writeStream.write(`ERROR: ${error}: ❌`);
|
writeStream.write("Error ❌");
|
||||||
throw error;
|
throw error;
|
||||||
} finally {
|
} finally {
|
||||||
writeStream.end();
|
writeStream.end();
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export const spawnAsync = (
|
|||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
resolve(stdout);
|
resolve(stdout);
|
||||||
} else {
|
} else {
|
||||||
const err = new Error(`child exited with code ${code}`) as Error & {
|
const err = new Error(`${stderr.toString()}`) as Error & {
|
||||||
code: number;
|
code: number;
|
||||||
stderr: BufferList;
|
stderr: BufferList;
|
||||||
stdout: BufferList;
|
stdout: BufferList;
|
||||||
|
|||||||
Reference in New Issue
Block a user