#20 Prevent generate from autoapi package?

Open
opened 3 years ago by colingagnon · 3 comments

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?

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?
otremblay commented 3 years ago
Owner

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?

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?
colingagnon commented 3 years ago
Poster

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.

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.
otremblay commented 3 years ago
Owner

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.

http://stackoverflow.com/a/25263604

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. http://stackoverflow.com/a/25263604
Sign up for free to join this conversation. Already have an account? Sign in to comment
No Milestone
No assignee
Loading...
Cancel
Save
There is no content yet.