Skip to content

Commit

Permalink
Merge pull request #1489 from mrkkrp/mrkkrp-message-on-missing-git-co…
Browse files Browse the repository at this point in the history
…mmit

Show a message when resetting git commit fails
  • Loading branch information
mgsloan committed Dec 11, 2015
2 parents f6c4348 + d7e2737 commit 0985d76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Stack/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,8 @@ resolvePackageLocation menv projRoot (PLRemote url remotePackageType) = do
Nothing
readInNull dirTmp commandName menv
(resetCommand ++ [T.unpack commit])
Nothing
(Just $ "Please ensure that commit " <> commit <>
" exists within " <> url)

case remotePackageType of
RPTHttpTarball -> do
Expand Down
2 changes: 1 addition & 1 deletion src/System/Process/Read.hs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ readProcessNull wd menv name args =
sinkProcessStdout wd menv name args CL.sinkNull

-- | Run the given command in the given directory. If it exits with anything
-- but success, prints an error and then calls 'exitWith' to exit the program.
-- but success, print an error and then call 'exitWith' to exit the program.
readInNull :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m)
=> Path Abs Dir -- ^ Directory to run in
-> FilePath -- ^ Command to run
Expand Down

0 comments on commit 0985d76

Please sign in to comment.