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
|
@ -0,0 +1,14 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 3"""
|
||||
date="2017-03-08T19:36:57Z"
|
||||
content="""
|
||||
Looking into it a bit more, the problem seems to be that findShellCommand
|
||||
expects a path to a file to examine, but when it's used for an external
|
||||
special remote, it's only given the name of the command.
|
||||
|
||||
So, I fixed it by searching for the command in the PATH.
|
||||
|
||||
I have still not tested if this works on Windows, but probably, I think.
|
||||
As long as PATH is set on Windows at least.
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue