Skip to content
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

Modify and test GDAL_DATA behavior #134

Merged
merged 5 commits into from
Nov 19, 2015
Merged

Modify and test GDAL_DATA behavior #134

merged 5 commits into from
Nov 19, 2015

Conversation

springmeyer
Copy link
Collaborator

  • If GDAL_DATA environment option is set, respect it
  • If the local data_path does not exist, throw (to prevent odd errors if mistakenly deleted)
  • Add tests for respecting GDAL_DATA environment options
  • Add tests for behavior of using local data by default

/cc @BergWerkGIS

 - If GDAL_DATA environment option is set, respect it
 - If the local data_path does not exist, throw (to prevent odd errors if mistakenly deleted)
 - Add tests for respecting GDAL_DATA environment options
 - Add tests for behavior of using local data by default
@springmeyer
Copy link
Collaborator Author

Motivation for this:

@springmeyer
Copy link
Collaborator Author

@BergWerkGIS - could I summon your help on finishing this work? Basically all tests are passing on unix but on Windows, with some versions of node, the tests are hitting a windows PATH quoting issue:

ok 14 gdal "config" property GDAL_DATA behavior should set GDAL_DATA config option to locally bundled path
not ok 15 gdal "config" property GDAL_DATA behavior should respect GDAL_DATA environment over locally bundled path
  Error: Command failed: 'C:\Program\' is not recognized as an internal or external command,  
  operable program or batch file.  

      at ChildProcess.exithandler (child_process.js:658:15)
      at ChildProcess.emit (events.js:98:17)
      at maybeClose (child_process.js:766:16)
      at Socket.<anonymous> (child_process.js:979:11)
      at Socket.emit (events.js:95:17)
      at Pipe.close (net.js:466:12)

Curiously only with the nodejs provided binaries (https://ci.appveyor.com/project/brianreavis/node-gdal/build/593) and not the mapbox compiled ones. Anyway, can you try replicating locally and see if you can find the right quoting incantation?

@wilhelmberg
Copy link
Contributor

After a quick glance at the test, double quotes around execPath should solve this.
Something like execPath = '"'+ execPath + '"'
Will take a deeper look tomorrow.

@wilhelmberg
Copy link
Contributor

@springmeyer
Copy link
Collaborator Author

Thank you @BergWerkGIS!

@brandonreavis @brandonreavis - any questions or concerns on this? Otherwise I'll merge tomorrow.

@brianreavis
Copy link
Member

@springmeyer @BergWerkGIS Looks perfect. Go for it!

springmeyer pushed a commit that referenced this pull request Nov 19, 2015
Modify and test GDAL_DATA behavior
@springmeyer springmeyer merged commit 83cfaa6 into master Nov 19, 2015
@springmeyer springmeyer deleted the gdal-data-fixes branch November 19, 2015 18:47
@springmeyer springmeyer mentioned this pull request Nov 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants