I am trying to use executeCommand with OS specific scripts. A command might be something like:
<changeSet author="ctrezza" id="theid">
<executeCommand executable="node.exe"
timeout="500s"
os="Windows 10">
<arg value="hello.js"/>
</executeCommand>
</changeSet>
I’d like to change the os and executable values to use a property instead:
<property name="NODE" value="node.exe" />
<property name="OS" value="Windows 10" />
<changeSet author="ctrezza" id="theid">
<executeCommand executable="${NODE}"
timeout="500s"
os="${OS}">
<arg value="hello.js"/>
</executeCommand>
</changeSet>
I feel like these should be equivalent and avoids the issue of windows version strings where I have an operating specific command to run. It’s important that if these scripts fail, that this failure is captured when the command runs, so that if my hello.js contains:
process.exit(1);
That the update command will catch it. And if I do not use a property, it does indeed catch that error:
Unexpected error running Liquibase: Error executing command: node.exe hello.js returned a code of 1
But I use a property instead, I don’t see any output, and the changeset is recorded as deployed in the database. It should not.
I don’t want to have to hardcode windows versions in the changelog. Is there a way to make this work?