domdinnes / node-flyway

Apply version control to databases from within a Node.js application.
26 stars 6 forks source link

Install CLI doesn't work on Windows environment #19

Closed thomasjetzinger closed 7 months ago

thomasjetzinger commented 1 year ago

I'm trying to use the library in my project to perform some migrations on a test database. It looks like that there is an issue with path seperators, when you use it on windows.

When i try to call flyway.install I always get the following error:

Attempted to log "[Error: ENOTDIR: not a directory, scandir 'C:\Development.....\flyway-8.2.2\native\mssql-jdbc_auth-9.2.1.x86.dll'] { errno: -4052, code: 'ENOTDIR', syscall: 'scandir', path: 'C:......'

The issue is this line:

image

files[0].path contains '/' as path separator and path.sep resolves to '\'.

Is there a way to resolve this issue?

domdinnes commented 1 year ago

Hi Thomas - I'll take a look at this and raise a fix. Watch this space!

domdinnes commented 7 months ago

https://github.com/domdinnes/node-flyway/pull/24 - resolved by this. @thomasjetzinger please let me know if you have any further issues.