Skip to content
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

Input prompt triggered in non-interactive session #12

Closed
Evizero opened this issue Dec 26, 2017 · 5 comments
Closed

Input prompt triggered in non-interactive session #12

Evizero opened this issue Dec 26, 2017 · 5 comments

Comments

@Evizero
Copy link
Collaborator

Evizero commented Dec 26, 2017

This is different than how I used to implement it. I can see an argument for allowing, say, a script to trigger the input prompt. That said, I think it complicates things in some automated environment.

What do you think about throwing an error in case the "always accept" option is not set and the session is not interactive?

@oxinabox
Copy link
Owner

oxinabox commented Dec 27, 2017

Indeed it is different.
I personally run most scripts via julia myscript.jl not via REPL + include("myscript.jl")
(Which conversely means the behavior of a few of your things cause problems for me)

The problem does indeed occur in CI that if you forget to set the environment variable it will just make CI hang til it times out.
But when that happens it is pretty obvious that CI is handing and has timed out from the logs,
and then setting the environment variable is easy.

I guess what is the worst that can happen if in noninteractive mode it decides to read stdin?

@Evizero
Copy link
Collaborator Author

Evizero commented Dec 27, 2017

Ok, I can understand that preference. My main intention here was to see how strong you feel about this. I'll play with it some more and see if I either get used to it or find a way to work around it

@Evizero Evizero closed this as completed Dec 27, 2017
@oxinabox
Copy link
Owner

I wonder what the best way to tell the program that reading from STDIN is not acceptable?
Maybe there should be a Base function, like isinteractive() but set-able.

@alyst
Copy link

alyst commented Aug 30, 2018

Would it be possible to automatically detect CI (get(ENV, "CI")) and disable the prompt in that case? If it's CI session and DATADEPS_ALWAYS_ACCEPT is false/not set that should probably result in an error in download()?

@oxinabox
Copy link
Owner

I was considering this. Can you open a fresh issue for it? ( just copy paste is fine)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants