Skip to content

Commit 270940e

Browse files
authored
fix: 🐛 rimraf missing path (#109)
1 parent 6c569d2 commit 270940e

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@serverless-devs/core",
3-
"version": "0.1.59",
3+
"version": "0.1.60",
44
"description": "Serverless Devs Tool Core Component",
55
"keywords": [
66
"Serverless",

publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Type: Component
22
Name: core
33
Provider:
44
- 阿里云
5-
Version: 0.1.59
5+
Version: 0.1.60
66
Description: Serverless Devs 核心组件
77
HomePage: https://github.com/Serverless-Devs/core
88
Tags: #标签详情

src/common/execCommand/globalActions/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class GlobalActions {
7979
async run(type: IGlobalActionValue) {
8080
if (type === IGlobalAction.COMPLETE) {
8181
await this.tracker();
82-
rimraf.sync(this.tracePath);
82+
this.tracePath && rimraf.sync(this.tracePath);
8383
}
8484
const hooks = filter(this.actions, (item) => item.action === type);
8585
if (isEmpty(hooks)) return;
@@ -136,6 +136,7 @@ class GlobalActions {
136136
const yamlContent = await getYamlContent(get(newInputs, 'path.configPath'));
137137
if (isEmpty(yamlContent)) return;
138138
this.tracePath = path.join(getRootHome(), 'config', `${traceId}.json`);
139+
if(!fs.existsSync(this.tracePath)) return;
139140
const data = fs.readJSONSync(this.tracePath);
140141
if (isEmpty(data)) return;
141142

src/daemon/constant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
DEFAULT_CORE_VERSION: '0.1.59',
2+
DEFAULT_CORE_VERSION: '0.1.60',
33
};

0 commit comments

Comments
 (0)