{"action":"created","issue":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/80","labels_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/80/comments","events_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/80/events","html_url":"https://github.com/Gabriel439/Haskell-Turtle-Library/issues/80","id":91260010,"number":80,"title":"Is there a way to compensate for shell error?","user":{"login":"AlexeyRaga","id":1394391,"avatar_url":"https://avatars.githubusercontent.com/u/1394391?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexeyRaga","html_url":"https://github.com/AlexeyRaga","followers_url":"https://api.github.com/users/AlexeyRaga/followers","following_url":"https://api.github.com/users/AlexeyRaga/following{/other_user}","gists_url":"https://api.github.com/users/AlexeyRaga/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexeyRaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexeyRaga/subscriptions","organizations_url":"https://api.github.com/users/AlexeyRaga/orgs","repos_url":"https://api.github.com/users/AlexeyRaga/repos","events_url":"https://api.github.com/users/AlexeyRaga/events{/privacy}","received_events_url":"https://api.github.com/users/AlexeyRaga/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-06-26T14:04:15Z","updated_at":"2015-06-28T19:36:28Z","closed_at":"2015-06-28T11:01:46Z","body":"I see that in case if a shell command errors out the `Shell` monad produces `empty`. This aborts the shell actions sequence in the `do` block.\r\n\r\nWhen using `inshell`, what would be the way of getting the result of the executed command as usual, but compensate with another action in case of an error?\r\n"},"comment":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/comments/116319783","html_url":"https://github.com/Gabriel439/Haskell-Turtle-Library/issues/80#issuecomment-116319783","issue_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/80","id":116319783,"user":{"login":"PierreR","id":93115,"avatar_url":"https://avatars.githubusercontent.com/u/93115?v=3","gravatar_id":"","url":"https://api.github.com/users/PierreR","html_url":"https://github.com/PierreR","followers_url":"https://api.github.com/users/PierreR/followers","following_url":"https://api.github.com/users/PierreR/following{/other_user}","gists_url":"https://api.github.com/users/PierreR/gists{/gist_id}","starred_url":"https://api.github.com/users/PierreR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierreR/subscriptions","organizations_url":"https://api.github.com/users/PierreR/orgs","repos_url":"https://api.github.com/users/PierreR/repos","events_url":"https://api.github.com/users/PierreR/events{/privacy}","received_events_url":"https://api.github.com/users/PierreR/received_events","type":"User","site_admin":false},"created_at":"2015-06-28T19:36:28Z","updated_at":"2015-06-28T19:36:28Z","body":"Oh sure that would work ... with `shell` or `shellStrict`. I have been confused by the fact you mention it would work with `shellStrict` exclusively ;-)\r\nSo there is no way to get the error code with `$?` then."}}