Insufficient quoting in the liquibase shell script wrapper


I just wanted to let you know that there is a quoting bug in the liquibase wrapper, at least in the 1.9.x stable version.  The last line currently reads:

java -cp $CP $JAVA_OPTS liquibase.commandline.Main $@

which makes it impossible to pass arguments with spaces such as dates to the rollbackToDate command because the shell breaks them up into separate arguments.

A simple change to:

java -cp $CP $JAVA_OPTS liquibase.commandline.Main ${1+"$@"}

preserves the arguments exactly as they are passed to the wrapper script.

Thanks for such a great package!  You saved me many hours of writing our own in-house database schema management.


Thanks, I made the change for the upcoming 2.0.

Glad liquibase as been helpful for you.  Let us know if you run into any other problems or have any suggestions.