-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversion to an output file writes to a directory instead of a file #344
Comments
If an output is specified it should always "win". I guess i just missed to test this enough. So if you are able to fix this please go ahead. |
@KaiVolland - the issue is the output could be specified as a file or folder. As they might not yet exist I can only think of checking for a file extension in the |
We could also check if the -o parameter contains at least one |
A common case could be to put a path to a file e.g. Attempted fix at #345 but it relies on the root folder being created first. Maybe checking if the source is a folder (which has to exist) would be a better option? If a user put a path to a file in the output parameter then it would simply create a folder with a "file-like" name. |
@geographika is this issue solved? |
@jansule - yes fixed in https://github.com/geostyler/geostyler-cli/pull/347/files. Closing. // Assume the target is the same as the source
let targetIsFile = sourceIsFile; |
This issue is linked to changes in #335
The code below checks if the output parameter exists and if it is a file, however when writing an output this file won't exist, and
targetIsFile
is alwaysfalse
.This leads to the output being written to subdirectories based on the input e.g.
npm start -- -s qgis -t qgis -o output.sld testdata/point_simple.qml
createsoutput.qml/point_simplepoint.qml
The workflow in #343 highlights this issue.
See for example the output at https://github.com/geographika/geostyler-cli/actions/runs/4925040568/jobs/8798798475#step:8:13
I'm unsure of the best approach to fix this. Would simply checking for an extension of the output parameter to set
targetIsFile
be enough?The text was updated successfully, but these errors were encountered: