Skip to content

Commit 624679a

Browse files
author
한혜원
committed
accepting default app.yaml file
1 parent d2f3f60 commit 624679a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default function entrypoint(options = {}) {
1515
useCloudTracing = false,
1616
dependencies = {},
1717
nodejsRuntime = 18,
18+
defaultYamlFile = "app.yaml"
1819
} = options;
1920

2021
return {
@@ -140,9 +141,9 @@ export default function entrypoint(options = {}) {
140141

141142
// Load existing app.yaml if it exists
142143
let yaml = {};
143-
if (existsSync("app.yaml")) {
144-
builder.log.minor("Existing app.yaml found");
145-
yaml = YAML.parse(readFileSync("app.yaml").toString());
144+
if (existsSync(defaultYamlFile)) {
145+
builder.log.minor(`Existing ${defaultYamlFile} found`);
146+
yaml = YAML.parse(readFileSync(defaultYamlFile).toString());
146147
}
147148

148149
const serverRoutes = [

0 commit comments

Comments
 (0)