include path in "Cannot find old distribution bundle; not upgrading" message
This commit is contained in:
parent
2bb31a6923
commit
c6d690f350
1 changed files with 3 additions and 3 deletions
|
@ -222,18 +222,18 @@ upgradeToDistribution newdir cleanup distributionfile = do
|
||||||
{- Finds where the old version was installed. -}
|
{- Finds where the old version was installed. -}
|
||||||
oldVersionLocation :: IO FilePath
|
oldVersionLocation :: IO FilePath
|
||||||
oldVersionLocation = do
|
oldVersionLocation = do
|
||||||
#ifdef darwin_HOST_OS
|
|
||||||
pdir <- parentDir <$> readProgramFile
|
pdir <- parentDir <$> readProgramFile
|
||||||
|
#ifdef darwin_HOST_OS
|
||||||
let dirs = splitDirectories pdir
|
let dirs = splitDirectories pdir
|
||||||
{- It will probably be deep inside a git-annex.app directory. -}
|
{- It will probably be deep inside a git-annex.app directory. -}
|
||||||
let olddir = case findIndex ("git-annex.app" `isPrefixOf`) dirs of
|
let olddir = case findIndex ("git-annex.app" `isPrefixOf`) dirs of
|
||||||
Nothing -> pdir
|
Nothing -> pdir
|
||||||
Just i -> joinPath (take (i + 1) dirs)
|
Just i -> joinPath (take (i + 1) dirs)
|
||||||
#else
|
#else
|
||||||
olddir <- parentDir <$> readProgramFile
|
let olddir = pdir
|
||||||
#endif
|
#endif
|
||||||
when (null olddir) $
|
when (null olddir) $
|
||||||
error $ "Cannot find old distribution bundle; not upgrading."
|
error $ "Cannot find old distribution bundle; not upgrading. (Looked in " ++ pdir ++ ")"
|
||||||
return olddir
|
return olddir
|
||||||
|
|
||||||
{- Finds a place to install the new version.
|
{- Finds a place to install the new version.
|
||||||
|
|
Loading…
Reference in a new issue