Closed molynerd closed 2 days ago
I like this idea, should be fairly simple to add. Care to take a swing at a PR?
I like this idea, should be fairly simple to add. Care to take a swing at a PR?
yeah I'll give it a shot! might take me a while though ;)
In order to validate that my local machine and deployed environment are running the same version of
ogr2ogr
, it would be nice if this lib had an easy way to print out the details fromogr2ogr --version
.Yes, one could use
child_process
to run a shell and attempt to gather this information separately, but there isn't a guarantee that child_process and this lib will find the same CLI executable. Additionally, the implementer of this lib would be required to know the path to the ogr2ogr executable, which is already taken care of by the lib.Possible solution:
I have tried using existing functionality, but I'm not able to get around an issue where the lib expects a path to be passed in for the file I'm operating on (in this case, there is no file). Strangely, the command the lib spits out actually does work when run separately, but doesn't work in the lib.
the command
/opt/homebrew/bin/ogr2ogr --version -f GeoJSON -skipfailures /vsistdout/ /path/to/a/real/file
does actually work separately.