Merge pull request #277 from Dokploy/refactor/spawn-async

refactor: add error message in error builder
This commit is contained in:
Mauricio Siu 2024-07-27 00:49:44 -06:00 committed by GitHub
commit 9898cac2f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ Compose Type: ${composeType} ✅`;
writeStream.write("Docker Compose Deployed: ✅");
} catch (error) {
writeStream.write(`ERROR: ${error}: ❌`);
writeStream.write("Error ❌");
throw error;
} finally {
writeStream.end();

View File

@ -51,7 +51,7 @@ export const buildApplication = async (
await mechanizeDockerContainer(application);
writeStream.write("Docker Deployed: ✅");
} catch (error) {
writeStream.write(`ERROR: ${error}: ❌`);
writeStream.write("Error ❌");
throw error;
} finally {
writeStream.end();

View File

@ -39,7 +39,7 @@ export const spawnAsync = (
if (code === 0) {
resolve(stdout);
} else {
const err = new Error(`child exited with code ${code}`) as Error & {
const err = new Error(`${stderr.toString()}`) as Error & {
code: number;
stderr: BufferList;
stdout: BufferList;