https://pharo.fogbugz.com/default.asp?17099

On Tue, Nov 24, 2015 at 10:41 PM, stepharo <steph...@free.fr> wrote:
> I'm bad with scripts :)
> but this is important to improve them.
> Can you open a bug entry so that this discussion is not lost?
>
> Le 24/11/15 00:25, Dale Henrichs a écrit :
>
>> I've been using zero-conf scripts to download the pharo vm for a while and
>> occasionally the download fails to install the vm in the pharo-vm directory
>> .... silently ..... with no clue as to what happened. even worse the exit
>> status is zero so the failure isn't noticed until much later on in my
>> install when an attempt is made to actually use the vm .... I do know that
>> when I see these failures the pharo-vm does get created but is  empty ...
>>
>> I got another failure today and figured that I would dig into this on my
>> end to see if I could understand what might be going on ....
>>
>> The section of the zero-conf script that is suspect is the following:
>>
>>   mkdir $VM_DIR
>>   $DOWNLOAD_TO$VM_DIR/vm.zip $VM_URL
>>
>>
>> After the $VM_DIR is created (which I know happens), the $DOWNLOAD_TO
>> script is run. Recently, I learned that a side effect of using the --silent
>> option for curl is that error messages are also suppressed and I see that
>> for curl, the `--silent` option is being used:
>>
>> if [[ `which curl 2> /dev/null` ]]; then
>>     DOWNLOAD="curl --silent --location --compressed ";
>>     DOWNLOAD_TO="$DOWNLOAD --output ";
>> elif [[ `which wget 2> /dev/null` ]]; then
>>     DOWNLOAD_TO="wget --quiet --output-document=";
>>     DOWNLOAD="$DOWNLOAD_TO-";
>> else
>>     echo "Please install curl or wget on your machine";
>>     exit 1
>> fi
>>
>>
>> For curl if you want to turn off the progress meter (a good thing) and
>> continue to report errors, you need to use --show-error in conjunction with
>> --silent (as described in the man page)
>>
>> I think the same thing applies to wget, --quiet turns off error messages
>> and progress .... you probably should be using --no-verbose to continue to
>> get error messages ...
>>
>> Dale
>>
>>
>>
>
>

Reply via email to