question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Relational Database (Beta) - Bug with the Terminal in 'mkdir' test

See original GitHub issue

Describe 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)

image

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

https://www.freecodecamp.org/learn/relational-database/learn-bash-by-building-a-boilerplate/build-a-boilerplate

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:closed
  • Created a year ago
  • Comments:25 (25 by maintainers)

github_iconTop GitHub Comments

2reactions
fullStackRacccommented, Jun 1, 2022

ah cool cool i’ll try that

EDIT: ayyyyyy that worked thank you so much

2reactions
moT01commented, May 31, 2022

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:

const websiteDirectory = await getDirectoryContents('../website');

It already has it, but it’s looking for the wrong folder. When you make the website folder, you’re in Projects already, so the …/ at the beginning will check outside of that folder

I don’t think that’s true. The tests run from projects/freeCodeCamp so you need to go back a level to get to projects

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 be mv stiles.css styles.css - which is split by spaces (for the most part), and turned into the lastCommand 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug on Learn Git by Building an SQL Reference Object Course
Since 26.06.2022 morning I am trying to continue my progress in Relational Database (Beta) Course => Learn Git by Building an SQL Reference ......
Read more >
Changelog — Python 3.11.1 documentation
gh-98713: Fix a bug in the typing tests where a test relying on CPython-specific implementation details was not decorated with @cpython_only and ...
Read more >
Ubuntu Server Documentation
Ubuntu Server is a member of the Ubuntu family. It's an open source project that welcomes community projects, contributions, suggestions, fixes and ...
Read more >
MySQL Reference Manual for version 3.23.25-beta. - IME-USP
For a history of new features and bug fixes, see section E MySQL change ... A relational database stores data in separate tables...
Read more >
MySQL Reference Manual for version 3.23.47. - Oninit:
For a history of new features and bug fixes, see section F MySQL change ... A relational database stores data in separate tables...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found