Azure / Azure/azure-functions-core-tools
`func host start` allows running in invalid directory
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 5d 4h
- Merged PRs (30d)
- 15
Description
If you run `func host start` in a directory outside of the project, it exits with the error: `Unable to find project root.`. This is good behavior.
However, if you run `func host start` in a function subdirectory (e.g. `HttpTrigger` from the examples), then it will create a new `host.json` file and start. This is inconsistent behavior. A preferred behavior would be to exit similar to if it was outside of the directory.
Contributor guide
Research direction
Reproduce `func host start` from a function subdirectory such as `HttpTrigger`, then trace the project-root validation and `host.json` creation path. Done means the command exits like it does outside the project and does not create a new `host.json` file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100