Skip to content

Commit

Permalink
fix: aliyun task worker won't have stderr
Browse files Browse the repository at this point in the history
Signed-off-by: zxypro1 <[email protected]>
  • Loading branch information
zxypro1 committed Nov 26, 2024
1 parent 0af9a22 commit 53e582e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/engine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serverless-devs/engine",
"version": "0.1.5-beta.13",
"version": "0.1.5-beta.14",
"description": "a engine lib for serverless-devs",
"main": "lib/index.js",
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions packages/engine/src/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ You can still use them now, but we suggest to modify them.`)
});

// Listen to the 'data' event of stderr. Append the data chunk to the logger and the stderr array.
// 20241125: aliyun task worker wouldn't output stderr
if (utils.getCurrentEnvironment() !== 'app_center'){
cp.stderr.on('data', (chunk: Buffer) => {
this.logger.append(chunk.toString());
stderr.push(chunk);
});
}
cp.stderr.on('data', (chunk: Buffer) => {
this.logger.append(chunk.toString());
// 20241125: aliyun task worker wouldn't output stderr
if (utils.getCurrentEnvironment() !== 'app_center'){
stderr.push(chunk)
}
});

// Listen to the 'exit' event of the command process.
// If the process exits with a code of 0, resolve the promise.
Expand Down

0 comments on commit 53e582e

Please sign in to comment.