-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accepting default app.yaml file #176
base: main
Are you sure you want to change the base?
Conversation
a176d3e
to
624679a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this feature!
Can you also update the readme with the new configuration option.
@@ -15,6 +15,7 @@ export default function entrypoint(options = {}) { | |||
useCloudTracing = false, | |||
dependencies = {}, | |||
nodejsRuntime = 18, | |||
defaultYamlFile = "app.yaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make more sense to name the parameter something like 'appYamlFile' and not default, since the config overrides the default (which is app.yaml)
if (existsSync("app.yaml")) { | ||
builder.log.minor("Existing app.yaml found"); | ||
yaml = YAML.parse(readFileSync("app.yaml").toString()); | ||
if (existsSync(defaultYamlFile)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a yaml file is specified i think the code should throw an error if the file is not found, otherwise it can probably be a bit confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although that might be a bit more complicated to get right. I'm fine either way
#175