Bash 5 programs - Fortune App - Until loop

issue:
I’m working through creating the fortune app and I’m stuck on this module where I need to create an “until” loop to check if whether or not the user entered a question in the prompt. I have been having a series of misunderstandings throughout the lessons about the directions being given as they are written, and then imho crucial information being left out. An example would be from a prior lesson where we’re creating an if-elif branch, and to pass the test, the branch needs to be created where the if condition is written within double parentheses (()) and each subsequent elif condition is written in alternating double brackets [] and double parentheses(()). Additionally, there was ambiguity on if the test was asking for a standard programming comparison operator (<, >, <=, >=, == ) or one of these operators (-lt, -gt, -le, -ge, -eq). It was quite a hassle trying to figure out what was being asked for, especially since, depending on if you’re using brackets or parentheses, you need to include the $ for brackets and not include the $ for parentheses.

On this particular problem, I have gotten all of the hints and have written my code according to what the directions are saying, and it’s still not passing the test. I have refreshed the page, reset the gitpod session, and did multiple lesson resets, and nothing seems to work. So I am thinking there’s something that needs to be obviously stated in the directions that isn’t being stated, and that something not being stated is causing the tests on the back end to fail. And ideas what’s going on?

I’ll write comments to quote the directions and the hints

code so far:

#!/bin/bash
# Program to tell a persons fortune

echo -e "\n~~ Fortune Teller ~~\n"

RESPONSES=("Yes" "No" "Maybe" "Outlook good" "Don't count on it" "Ask again later")
N=$(( RANDOM % 6 ))

GET_FORTUNE() {
  echo Ask a yes or no question:
  read QUESTION
}

: ‘up to this point, before writing this loop, the only lines of code below this were the GET_FORTUNE call and the echo Responses line, and that passed the previous lesson.’

: 'Direction: “Add an ‘until’ loop below your function.” (I’m interpreting this to mean placing this loop underneath the GET_FORTUNE() function written above). “Use double brackets to check if QUESTION is equal to test?” One of the hints says that the until loop should look like this:
BashUntilLoop

until [[ $QUESTION == test?]]
  do
    GET_FORTUNE
  done

: ‘one of the hints says that I should only call the GET_FORTUNE function once, and the last hint says that the echo ${RESPONSES[$N]} command should be at the bottom of the file. Obviously below ↓ is the echo command, but I believe that if I’m only calling the GET_FORTUNE function once, it would need to be called within the until loop.’

echo ${RESPONSES[$N]}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

Learn Bash Scripting by Building Five Programs

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

I would make sure the spacing and indentation is exactly the same. “do” and “done” do not get indented and there should be a space between test? and the ]]

Your code is correct, I had the same problem, I just reset the webpage and it worked