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
Don't load config from stdin unless asked #2859
Comments
A common unix convention is to read from stdin when |
As this will require breaking current users of the system, we will be doing this change as part of the breaking changes in v7 |
This feature is now available in the V7 beta which you can read more about here. |
Thanks! |
Which version and edition of Flyway are you using?
6.4.4 Community edition
If this is not the latest version, can you reproduce the issue with the latest one as well?
(Many bugs are fixed in newer releases and upgrading will often resolve the issue)
n/a
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Command line
Which database are you using (type & version)?
PostgreSQL v10
Which operating system are you using?
Ubuntu Linux
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
Attempting to run
flyway migrate
in certain environments whereSystem.in.available()
returns something greater than 0 causes Flyway to hang. In particular I've observed this with anssh
session using-t -t
and a heredoc (see below).What did you expect to see?
I expected
flyway migrate
to complete normally, and in particular I did not expect Flyway to attempt to read config from stdin unless it was specifically asked to do so via a command line argument. I also think Flyway should print a prompt if it is waiting for configuration input from stdin, because if you weren't expecting it to try to read from stdin it's quite surprising, and it looks like a bug causing Flyway to hang.What did you see instead?
At this point flyway hangs and produces no more input. From the code it looks like Flyway tries to read from stdin unconditionally:
flyway/flyway-commandline/src/main/java/org/flywaydb/commandline/Main.java
Line 101 in c3efc6b
I was able to work around this by writing
flyway migrate </dev/null
.The text was updated successfully, but these errors were encountered: