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.
This commit is contained in:
parent
0d1a1838c5
commit
5358fb992a
5 changed files with 28 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue