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
|
@ -33,7 +33,7 @@ import Assistant.WebApp.SideBar
|
|||
import Command.P2P (unusedPeerRemoteName, PairingResult(..))
|
||||
import P2P.Address
|
||||
import Git
|
||||
import Config.Files
|
||||
import Annex.Path
|
||||
import Utility.Process.Transcript
|
||||
|
||||
import qualified Data.Map as M
|
||||
|
@ -72,7 +72,7 @@ getPrepareWormholePairR pairingwith = do
|
|||
|
||||
enableTor :: Handler ()
|
||||
enableTor = do
|
||||
gitannex <- liftIO readProgramFile
|
||||
gitannex <- liftIO programPath
|
||||
(transcript, ok) <- liftIO $ processTranscript gitannex ["enable-tor"] Nothing
|
||||
if ok
|
||||
-- Reload remotedameon so it's serving the tor hidden
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue