When re-execing git-annex, use current program location, rather than ~/.config/git-annex/program, when possible.
Most of the time, there will be no discreprancy between programPath and readProgramFile. But, the programFile might have been written by an old version of git-annex that is still installed, while a newer one is currently running. In this case, we want to run the same one that's currently running. This is especially important for things like the GIT_SSH=git-annex used for ssh connection caching. The only code that still uses readProgramFile directly is the upgrade code, which needs to know where the standalone git-annex was installed, in order to upgrade it.
This commit is contained in:
parent
b9275b65f9
commit
450ee53ab6
14 changed files with 28 additions and 25 deletions
|
@ -19,9 +19,9 @@ import Utility.Url
|
|||
import Utility.PID
|
||||
import qualified Git.Construct
|
||||
import qualified Git.Config
|
||||
import Config.Files
|
||||
import qualified Annex
|
||||
import qualified Git
|
||||
import Annex.Path
|
||||
|
||||
import Control.Concurrent
|
||||
#ifndef mingw32_HOST_OS
|
||||
|
@ -110,7 +110,7 @@ assistantListening url = catchBoolIO $ exists url' def
|
|||
-}
|
||||
startAssistant :: FilePath -> IO ()
|
||||
startAssistant repo = void $ forkIO $ do
|
||||
program <- readProgramFile
|
||||
program <- programPath
|
||||
(_, _, _, pid) <-
|
||||
createProcess $
|
||||
(proc program ["assistant"]) { cwd = Just repo }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue