If it matters, I'm downloading the pharo30 vm: get.pharo.org/vm30 On 11/23/2015 03:25 PM, Dale Henrichs wrote:
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