FIX: Y/n prompt should treat "no value" as yes
This commit is contained in:
parent
e06026b97c
commit
1f33e0ad55
|
@ -314,18 +314,19 @@ print_done() {
|
||||||
log "==================== DONE! ===================="
|
log "==================== DONE! ===================="
|
||||||
DOCTOR_FILE=$(date +%s | sha256sum | base64 | head -c 20).txt
|
DOCTOR_FILE=$(date +%s | sha256sum | base64 | head -c 20).txt
|
||||||
|
|
||||||
if [ $app_name == 'app' ] && [ "$NO_CONTAINER" != 'y' ]
|
if [ $app_name == 'app' ] && [ "$NO_CONTAINER" != 'y' ]; then
|
||||||
then
|
read -p "Would you like to serve a publicly available version of this file? (Y/n) " serve
|
||||||
read -p "Would you like to serve a publicly available version of this file? (Y/n)" serve
|
case "${serve:-Y}" in
|
||||||
if [ $serve == 'Y' ]
|
y*|Y*)
|
||||||
then
|
|
||||||
cp $LOG_FILE shared/standalone/log/var-log/$DOCTOR_FILE
|
cp $LOG_FILE shared/standalone/log/var-log/$DOCTOR_FILE
|
||||||
sudo docker exec -w /var/www/discourse -i $app_name cp /var/log/$DOCTOR_FILE public
|
sudo docker exec -w /var/www/discourse -i $app_name cp /var/log/$DOCTOR_FILE public
|
||||||
log "The output of this program may be available at http://$DISCOURSE_HOSTNAME/$DOCTOR_FILE"
|
log "The output of this program may be available at http://$DISCOURSE_HOSTNAME/$DOCTOR_FILE"
|
||||||
log "You should inspect that file carefully before sharing the URL."
|
log "You should inspect that file carefully before sharing the URL."
|
||||||
else
|
;;
|
||||||
|
*)
|
||||||
log "Publicly available log not generated."
|
log "Publicly available log not generated."
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
# The following is not in the web log file since it was copied above, which seems correct
|
# The following is not in the web log file since it was copied above, which seems correct
|
||||||
log
|
log
|
||||||
|
|
Loading…
Reference in New Issue