summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-03-08 15:56:55 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-03-08 15:59:00 -0400
commit501881a6affdf9c5dc380eb14405e2363d7cc833 (patch)
treea1241fc62e8ea1b18a5b9260e625057f338d9e94 /Utility
parentdefe0afb45378ec54cb115f199e6352ee8695681 (diff)
Windows: Improve handling of shebang in external special remote program, searching for the program in the PATH.
findShellCommand needs a full path to a file in order to check it for a shebang on Windows. It was being run with only the base name of the external special remote program, which would only work when it was in the current directory. This is why users in https://github.com/DanielDent/git-annex-remote-rclone/pull/10 and elsewhere were complaining that the previous improvements to git-annex didn't make git-remote-rclone work on Windows. Also, reworked checkearlytermination, which while it worked, seemed to rely on a race condition. And, improved its error messages. This commit was sponsored by Shane-o on Patreon.
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Path.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Utility/Path.hs b/Utility/Path.hs
index 3ee5ff39d..cd9dc3859 100644
--- a/Utility/Path.hs
+++ b/Utility/Path.hs
@@ -227,6 +227,8 @@ inPath command = isJust <$> searchPath command
-
- The command may be fully qualified already, in which case it will
- be returned if it exists.
+ -
+ - Note that this will find commands in PATH that are not executable.
-}
searchPath :: String -> IO (Maybe FilePath)
searchPath command