-
Notifications
You must be signed in to change notification settings - Fork 465
Check if bundle config exists, hostJson exists #1882
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
Conversation
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.
added few comments
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.
Assuming 3.x changes are similar. Please ping when both PRs are updated
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.
Added minor comments. Please do look at the PR build failures.
| private void ValidateHostJsonConfiguration() | ||
| { | ||
| bool IsPreCompiledApp = IsPreCompiledFunctionApp(); | ||
| var hostJsonPath = Path.Combine(Environment.CurrentDirectory, Constants.HostJsonFileName); |
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.
hostJsonPath is being calculated at multiple places. Move this to constant?
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 updated the logic to calculate the hostJsonPath only once. I cannot make it a constant because the value of the Environment.CurrentDirectory changes based on the context. If i make hostJson path constant the Environment.CurrentDirectory it would may end up using incorrect path.
|
|
||
| if (IsPreCompiledApp && BundleConfigurationExists(hostJsonPath)) | ||
| { | ||
| throw new CliException($"Extension bundle configuration should not be present for the function app with pre-compiled functions. Please remove extension bundle configuration from host.json: {Path.Combine(Environment.CurrentDirectory, "host.json")}"); |
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.
move hostJson path to constant and reuse
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
resolves #1828