Closed B-Kluss closed 1 year ago
Hi,
That error happens because in the run script set -o nounset
is set near the top. It doesn't allow variables to ever be undefined.
I'm guessing something happened with the .env
file because if the run script tried to run with an unbound variable it's very possible the run script is sourcing that file expecting a variable to exist but the variable doesn't exist and it becomes undefined.
What did you rename your project to?
I can't reproduce that here. I just ran these steps and everything worked:
bin/rename-project hmm Hmm
to rename the projectdocker compose up --build
./run manage migrate
./run lint
./run format
./run manage test
Thank you for the very quick answer. In advance, do I have to change anything in the .env
file? I've set up a new Project according to the mentioned steps above. So even with the name hmm
, I'm still facing the error.
The rename script will rename everything for you, no manual adjustments are needed.
Did you make any other adjustments?
What shell and version are you using? Bash, zsh or something else?
No, I have not made any adjustments. I am using zsh
and operating on OS X. My root directory is called test-repo
but I guess it should have no effect on that issue.
Got the same problem when using bash
All of that sounds normal. I run zsh too, and the script itself is set to use bash.
If you run bash --version
what version do you get back? I wonder if something isn't compatible with Bash 3.2 which is what comes on macOS by default.
Also for clarity, does everything work if you don't rename the project?
The renaming process has no impact on the issue. I am using 3.2.57(1)-release
as bash version.
Did you copy the .env.example
file to .env
?
Yes, I've copied it and have not applied any changes to it.
I don't have a Mac but I can ask someone to test this on theirs tomorrow.
Ok, I've updated bash to 5.1.12 and now it works as expected. Thank you for your support.
Ah, that that was my suspicion but I would like this project to work with Bash 3.2.X which is the default version on macOS so I'll see what I can do.
Alright, if there is anything I can test for you. Let me know.
Hello,
I've followed your Running this app manual and changed the name of the project with the rename-project script. Afterward, I built the project and run the migration. So, to test everything I wanted to run the 3 suggested ./run commands but I get for lint and format the following outputs:
./run lint
./run format
./run: line 56: @: unbound variable
./run: line 61: @: unbound variable
I guess something went wrong. Do you have any suggestions?
Best regards