diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-02-28 17:23:13 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-02-28 17:23:13 -0400 |
commit | 849a4b1a0d71071a602f552125fd7e25689662db (patch) | |
tree | 0b78308f8616c4920d1d109c5afe00bf52492595 /Command | |
parent | a35208c5df555006431a66436288ce156af4fdb9 (diff) |
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.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Assistant.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/Assistant.hs b/Command/Assistant.hs index 5bdf51682..0fad6b619 100644 --- a/Command/Assistant.hs +++ b/Command/Assistant.hs @@ -11,6 +11,7 @@ import Common.Annex import Command import qualified Command.Watch import Annex.Init +import Annex.Path import Config.Files import qualified Build.SysConfig import Utility.HumanTime @@ -69,7 +70,7 @@ autoStart startdelay = do when (null dirs) $ do f <- autoStartFile error $ "Nothing listed in " ++ f - program <- readProgramFile + program <- programPath haveionice <- pure Build.SysConfig.ionice <&&> inPath "ionice" forM_ dirs $ \d -> do putStrLn $ "git-annex autostart in " ++ d |