Skip to content

Commit

Permalink
publish: 0.1.66 (#124)
Browse files Browse the repository at this point in the history
Co-authored-by: neil.zxy <[email protected]>
  • Loading branch information
zxypro1 and neil.zxy authored Nov 20, 2023
1 parent 3de72ce commit 949b83e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serverless-devs/core",
"version": "0.1.66-beta.4",
"version": "0.1.66",
"description": "Serverless Devs Tool Core Component",
"keywords": [
"Serverless",
Expand Down
2 changes: 1 addition & 1 deletion publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Component
Name: core
Provider:
- 阿里云
Version: dev
Version: 0.1.66
Description: Serverless Devs 核心组件
HomePage: https://github.com/Serverless-Devs/core
Tags: #标签详情
Expand Down
12 changes: 11 additions & 1 deletion src/common/execCommand/component/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ class Hook {
if (fs.existsSync(execPath) && fs.lstatSync(execPath).isDirectory()) {
logger.debug(`cwd: ${execPath}`)
logger.debug(`process.env.PATH: ${process.env.PATH}`)

let result;
try {
spawnSync(configs.value, {
result = spawnSync(configs.value, {
cwd: execPath,
stdio: 'inherit',
shell: true,
Expand All @@ -74,6 +76,14 @@ class Hook {
serviceName: get(this.inputs, 'project.projectName'),
});
}

if (result.error || result.status !== 0 || result.signal !== null) {
const errStr = `Command failed with exit code ${result.status}: ${configs.value}`;
throwError({
error: {message: errStr},
serviceName: get(this.inputs, 'project.projectName'),
});
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/daemon/constant.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
DEFAULT_CORE_VERSION: 'dev',
DEFAULT_CORE_VERSION: '0.1.66',
};

0 comments on commit 949b83e

Please sign in to comment.