Merge pull request #5307 from mnachury/fix/exe_detection_windows

Fix executable check on windows
This commit is contained in:
Danielle Tomlinson
2019-02-08 17:46:55 -05:00
committed by GitHub

View File

@@ -9,7 +9,7 @@ import (
// On windows, an executable can be any file with any extension. To avoid
// introspecting the file, here we skip executability checks on windows systems
// and simply check for the convention of an `exe` extension.
// and simply check for the convention of an `.exe` extension.
func executable(path string, s os.FileInfo) bool {
return filepath.Ext(path) == "exe"
return filepath.Ext(path) == ".exe"
}