Hello,
I’m trying to use liquibase in a automated way in a python script. The problem is that when I launch the script from another directory than liquibase, the --defaultsFile argument seems to not be taken in account by liquibase and I forced to pass all the option in command-line.
I usually run liquibase as:
…/…/liquibase --defaultsFile=liquibase.properties update
and it seems to work. Is that the setup you are having problems with? Or am I misunderstanding the question?
Do you need to set a working directory for the call from python?
Nathan
Thanks for the reply.
The context is that LB will be used in a moving environnement, called not from the root path of LB’s bin, but rather from some random directory.
So, I needed to be able to call LB and the conf file with an absolute path, rather than a relative.
Unfortunatly, the –defaultsFile=[…]/liquibase.properties option wasn’t taken in account.
I just find the solution : python’s Popen method has a parameter (cwd) that allow to specify the working directory of the run subprocess.
Now it works perfectly.
Thanks again !
Good, thanks for the update.
Nathan