Skip to content

Issue with Windows #15

@twrighths

Description

@twrighths

Just came across an issue with how NPM runs in Windows and a way to work around it. Normally, if you install this via npm, it will create what are essentially wrappers to the commands you really want to call. In this case, we want to run flyway.cmd, but due to how npm pulls in the package, the node_modules/.bin folder gets 3 flyway executables [flyway, flyway.cmd, flyway.cmd.cmd]. Because of this, on windows, if you want to make use of this in your package.json scripts section, you have to use the .cmd.cmd script:

"scripts": {
  "migrate": "flyway.cmd.cmd -X -configFile=conf/flyway.conf migrate"
}

"scripts": {
  "migrate": "flyway.cmd.cmd -X -user=postgres -schemas=public,another migrate"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions