Executable should raise Informative when fetching source fails. #266

Closed
alloy opened this Issue May 22, 2012 · 6 comments

2 participants

@alloy
CocoaPods member

See #199 and #238.

@alloy alloy referenced this issue May 22, 2012
Closed

header not found #199

@fabiopelosin
CocoaPods member

This is related to #238.

The Git cache already raises if it isn't able to find the ref but the other downloader don't. I was thinking about making the executable raise if the exit code is different from 0, but this might not always be desirable (for example I have a private repo that is not under git and the pull fails). I've experimented with it in the specification refactor and now it presents a red exclamation mark in verbose mode.

@alloy
CocoaPods member

Agreed, simply printing a warning sounds like a good idea for when updating a spec repo fails.

However, in the case of fetching the source of a library it should really fail imo.

@fabiopelosin
CocoaPods member

One idea is to define two methods in executable, the normal one and the raising version. For example git and git!.

@alloy
CocoaPods member

Yeah that sounds like a good idea.

@alloy alloy added a commit that referenced this issue May 28, 2012
@alloy alloy Immediately print output from Executable when in verbose mode.
Fixes #276.

I understand that the reason was to indent the output, but I think it's
more important to have instant feedback.

I went on a yak shaving, but now we can capture output and show it at
the same time. This should allow for better error checking. The problem
is that, for instance, Git (almost) always exits with non-zero exit
statusses, so that's not a good way to check it. We should probably
check the actual output.

This is all related to #266.
bde1195
@alloy
CocoaPods member

@irrationalfab Maybe we should just remove the ‘failed command’ warning for now and add that back when we actually tackle this ticket?

@fabiopelosin
CocoaPods member

This issues has been addressed by various commits and should be closed by c9dd693.

@alloy alloy added a commit that referenced this issue Oct 25, 2014
@alloy alloy Immediately print output from Executable when in verbose mode.
Fixes #276.

I understand that the reason was to indent the output, but I think it's
more important to have instant feedback.

I went on a yak shaving, but now we can capture output and show it at
the same time. This should allow for better error checking. The problem
is that, for instance, Git (almost) always exits with non-zero exit
statusses, so that's not a good way to check it. We should probably
check the actual output.

This is all related to #266.
4962380
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment