liquibase / node-liquibase

Node.js wrap for Liquibase
MIT License
32 stars 14 forks source link

commandParamsString should be before action in the run method to avoid error unexpected command parameters #21

Closed plachanc73 closed 3 years ago

plachanc73 commented 3 years ago

In the run method, on the line 'return this.spawnChildProcess(${this.liquibasePathAndGlobalAttributes(mergedParams)} ${action} ${commandParamsString});', I think the ${commandParamsString} should be before ${action} to avoid error unexpected command parameters.

When I am calling the update with the parameter liquibaseSchemaName with this code, I am getting an unexpected command parameters: [--liquibaseSchemaName=schemaName]:

const liquibaseUpdateCommandAttribute: UpdateCommandAttributes = { liquibaseSchemaName: ${schemaName}, } instLiquibase.update(liquibaseUpdateCommandAttribute)

tabuckner commented 3 years ago

hey @plachanc73 what version of node-liquibase are you seeing this on?

plachanc73 commented 3 years ago

@tabuckner In the current version https://github.com/liquibase/node-liquibase/blob/master/src/liquibase.ts

tabuckner commented 3 years ago

@plachanc73 okay awesome! Not so much that you ran into an issue, but more that I just opened a PR that I believe resolves that issue.

I'll see if I can replicate the issue you reported locally and if so I'll have some more questions :)

Thank you for reporting this!! 😄

tabuckner commented 3 years ago

resolved by https://github.com/liquibase/node-liquibase/pull/23

tabuckner commented 3 years ago

released in https://www.npmjs.com/package/liquibase/v/4.3.9