Command-line on Windows: Locations with spaces fails with `was unexpected at this time` error #2220
Comments
On Windows, you need to wrap the entire argument in double quotes and it will work:
|
|
Hi @axelfontaine - Apologies, I forgot to mention that it works fine in
|
…h `was unexpected at this time` error
Thank you very much for digging deeper. We found the bug in our Windows batch argument parsing code that wasn't dealing properly with double quotes and spaces. Fixed. |
…ls with `was unexpected at this time` error
Which version and edition of Flyway are you using?
5.2.3
If this is not the latest version, can you reproduce the issue with the latest one as well?
(Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Command-Line | Powershell via Octopus
Which database are you using (type & version)?
SQL Server | Azure & 2017
Which operating system are you using?
Windows 10 | 2012R2
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
The
locations
path contains a space i.e.C:\Work\temp\(US) Test\sql\
. We tried the following.\flyway -user=xx -password=yy -url="jdbc:sqlserver://**;databaseName=**" -locations=filesystem:C:\Work\temp\(US) Test\sql\ migrate
.\flyway -user=xx -password=yy -url="jdbc:sqlserver://**;databaseName=**" -locations=filesystem:'C:\Work\temp\(US) Test\sql\' migrate
.\flyway -user=xx -password=yy -url="jdbc:sqlserver://**;databaseName=**" -locations=filesystem:"C:\Work\temp\(US) Test\sql\" migrate
.\flyway -user=xx -password=yy -url="jdbc:sqlserver://**;databaseName=**" -locations="filesystem:C:\Work\temp\(US) Test\sql\" migrate
&
.\flyway -user=xx -password=yy -url="jdbc:sqlserver://**;databaseName=**" -locations='filesystem:C:\Work\temp\(US) Test\sql\' migrate
.\flyway -user=xx -password=yy -url="jdbc:sqlserver://**;databaseName=**" -locations='filesystem:C:/Work/temp/(US)\ Test/sql' migrate
What did you expect to see?
Flyway Migration
What did you see instead?
Error:
Test/sql""=="" was unexpected at this time.
The text was updated successfully, but these errors were encountered: