Skip to content

Commit

Permalink
fix: init project fail when if else
Browse files Browse the repository at this point in the history
Signed-off-by: zxypro1 <[email protected]>
  • Loading branch information
zxypro1 committed Nov 7, 2024
1 parent c1cfce9 commit 03ce9cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 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.8",
"version": "0.1.5-beta.9",
"description": "a engine lib for serverless-devs",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/load-application/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serverless-devs/load-application",
"version": "0.0.15-beta.5",
"version": "0.0.15-beta.6",
"description": "load application for serverless-devs",
"main": "lib/index.js",
"scripts": {
Expand Down
4 changes: 1 addition & 3 deletions packages/load-application/src/v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class LoadApplication {
const newData = parse({ appName }, data);
fs.writeFileSync(this.spath, newData, 'utf-8');
} else {
this.doArtTemplate(path.join(this.filePath, this.getExtend(this.spath))); // 存在extend,把base yaml也做解析
const data = fs.readFileSync(path.join(this.filePath, this.getExtend(this.spath)), 'utf-8');
const { appName } = this.options;
if (isEmpty(appName)) return;
Expand All @@ -148,9 +149,6 @@ class LoadApplication {
private async parseTemplateYaml(postData: Record<string, any>) {
if (isEmpty(this.publishData)) return;
this.publishData = { ...this.publishData, ...postData };
if (!isEmpty(this.getExtend(this.spath))) {
this.doArtTemplate(path.join(this.filePath, this.getExtend(this.spath)));
}
return this.doArtTemplate(this.spath);
}
// 如果存在extend,对extend地址也做一个art-template
Expand Down

0 comments on commit 03ce9cb

Please sign in to comment.