use programPath consistently, not readProgramFile
Improve git-annex's ability to find the path to its program, especially when it needs to run itself in another repo to upgrade it. Some parts of the code used readProgramFile, probably because I forgot that programPath exists. I noticed this when a git-annex auto-upgrade failed because it was running git-annex upgrade --autoonly, but the code to run git-annex used readProgramFile, which happened to point to an older build of git-annex.
This commit is contained in:
parent
f83ead0240
commit
87d5583a91
8 changed files with 38 additions and 31 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
module Annex.Multicast where
|
||||
|
||||
import Config.Files
|
||||
import Annex.Path
|
||||
import Utility.Env
|
||||
import Utility.PartialPrelude
|
||||
|
||||
|
@ -22,7 +22,7 @@ multicastReceiveEnv = "GIT_ANNEX_MULTICAST_RECEIVE"
|
|||
|
||||
multicastCallbackEnv :: IO (FilePath, [(String, String)], Handle)
|
||||
multicastCallbackEnv = do
|
||||
gitannex <- readProgramFile
|
||||
gitannex <- programPath
|
||||
-- This will even work on Windows
|
||||
(rfd, wfd) <- createPipeFd
|
||||
rh <- fdToHandle rfd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue