Seems like you can generate an API while you are inside of the autoapi package itself.
We should probably prevent that? Or maybe add a confirmation step if this is somehow desired functionality?
Yeah, I doubt this will happen often, unless you're actually tweaking autoapi's code. At any rate if you come up with something that would prevent it, by all means, do it. That being said, if implemented, I'd like it to be "fork-conscious" if possible. It's easy to hardcode a path you don't want to run from, I don't know that we can know the package from which autoapi was built, at runtime. Can we?
Good question, was just a thought because I did accidentally.
Definitely needs to be work for forks too, will think about this one, maybe I'll come up with something magic like, but otherwise ya, flag this as low priority or whatever.
We could use this, it would work for forks as well, but it would only work inside the directory of the built binary. That, to me, is acceptable, as it is unlikely that someone would have three or four autoapi directories, and accidentally run the autoapi from one directory in another.