Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of missing image message with newer versions of Docker #3171

Merged
merged 1 commit into from
Jul 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Bug fixes:
* Switching a package between extra-dep and local package now forces
rebuild (previously it wouldn't if versions were the same).
See [#2147](https://github.com/commercialhaskell/stack/issues/2147)
* Fixed an issue where Stack wouldn't detect missing Docker images properly
with newer Docker versions.


## 1.4.0
Expand Down
3 changes: 2 additions & 1 deletion src/Stack/Docker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,9 @@ inspects envOverride images =
Left msg -> throwM (InvalidInspectOutputException msg)
Right results -> return (Map.fromList (map (\r -> (iiId r,r)) results))
Left (ProcessFailed _ _ _ err)
| "Error: No such image" `LBS.isPrefixOf` err -> return Map.empty
| any (`LBS.isPrefixOf` err) missingImagePrefixes -> return Map.empty
Left e -> throwM e
where missingImagePrefixes = ["Error: No such image", "Error: No such object:"]

-- | Pull latest version of configured Docker image from registry.
pull :: (StackM env m, HasConfig env) => m ()
Expand Down