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! ===================="
|
||||
DOCTOR_FILE=$(date +%s | sha256sum | base64 | head -c 20).txt
|
||||
|
||||
if [ $app_name == 'app' ] && [ "$NO_CONTAINER" != 'y' ]
|
||||
then
|
||||
read -p "Would you like to serve a publicly available version of this file? (Y/n)" serve
|
||||
if [ $serve == 'Y' ]
|
||||
then
|
||||
if [ $app_name == 'app' ] && [ "$NO_CONTAINER" != 'y' ]; then
|
||||
read -p "Would you like to serve a publicly available version of this file? (Y/n) " serve
|
||||
case "${serve:-Y}" in
|
||||
y*|Y*)
|
||||
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
|
||||
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."
|
||||
else
|
||||
;;
|
||||
*)
|
||||
log "Publicly available log not generated."
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# The following is not in the web log file since it was copied above, which seems correct
|
||||
log
|
||||
|
|
Loading…
Reference in New Issue