Fix executable check on windows

This commit is contained in:
mnachury
2019-02-08 15:50:10 -05:00
committed by mathieu nachury
parent ee5360f209
commit a8c97343cf

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"
}