Relational Database (Beta) - Bug with the Terminal in 'mkdir' test
See original GitHub issueDescribe the Issue
So I already know how to use BASH pretty well, because I use Linux as my daily driver, and I made a typo when it wanted me to make a directory for “website”
so just did mv websitre website
to change the name, and the ls shows the correct name, but the test isn’t working (I’m assuming it’s looking for me to specifically put in mkdir website
)
this is a screenshot with the last commands and the fail from the test, even after hitting Ctrl+Enter to try and get it read again.
It’s probably not an immediate issue, but it is definitely a bit jarring for someone at least already slightly familiar with terminal and BASH because mv is one of the first things you tend to pick up
EDIT: So i went to reset the lesson, and it also doesn’t clear out the already moved directory, so as far as I can tell the only solution to this issue at the moment is to rm -rf website
and then mkdir website
again
Affected Page
Your code
mkdir websitre
mv websitre website
Expected behavior
Expected for the program to see the new “website” directory in the project folder and continue the lesson
Screenshots
No response
System
- Device: Desktop
- OS: EndevourOS
- Browser: Opera
- Version: 87.0.4390.25
Additional context
I have attempted a few different similar typo issues now in other parts of the lesson, this is definitely just a case of the test is checking for the input, not the actual filenames.
Which is confusing if you have typos and try to fix them. If there was a way to make it so the test would look for the existence of the files when the student presses Ctrl+Enter to redo the test check, that would likely fix the problem
Issue Analytics
- State:
- Created a year ago
- Comments:25 (25 by maintainers)
Top GitHub Comments
ah cool cool i’ll try that
EDIT: ayyyyyy that worked thank you so much
I ran this by one of the team members. You seemed pretty excited to work on this, and like we said, there isn’t really a downside to add this - so if you want to give it a try, go for it.
One thing you mentioned:
I don’t think that’s true. The tests run from
projects/freeCodeCamp
so you need to go back a level to get toprojects
Also, this part of the test you suggested:
lastCommand[0] === 'mv' && /styles\.css$/.test(lastCommand[1]);
should be:lastCommand[0] === 'mv' && /styles\.css$/.test(lastCommand[2]);
I changed the last 1 to 2 - pretty sure it should be like that. The mv command would bemv stiles.css styles.css
- which is split by spaces (for the most part), and turned into thelastCommand
array.I know you got this in chat, but the instructions for working on these are here. I recently moved all the tests to the
INIT
commit, so you should only need to change that one. Let me know if you have any questions.