google / process.dart

BSD 3-Clause "New" or "Revised" License
52 stars 26 forks source link

Fix getExecutablePath to only return files that are actually readable and executable. #61

Closed gspencergoog closed 3 years ago

gspencergoog commented 3 years ago

If you have a file called "patch" (for instance), and it's mod 644 but in your path, the process.dart package will try and run it instead of the executable /usr/bin/patch in your path...

This PR fixes that, and adds a "real filesystem" test for that, since Dart doesn't have any way to manipulate file permissions in a virtual filesystem.

gspencergoog commented 3 years ago

/cc @tvolkert

tvolkert commented 3 years ago

If you wanna publish right away, then bump the pubspec and changelog

gspencergoog commented 3 years ago

Done! I also updated the test dev dependency to the stable release.