Open
Description
Describe the bug
tutorial at https://raw.githubusercontent.com/freeCodeCamp/learn-relational-databases-by-building-a-mario-database/main/tutorial.json is working on gitpod from https://www.freecodecamp.org/learn/relational-database/learn-relational-databases-by-building-a-mario-database/build-a-mario-database but it's not working locally on my Mac visual studio code.
To Reproduce
Steps to reproduce the behavior:
- import tutorial in local VS code https://raw.githubusercontent.com/freeCodeCamp/learn-relational-databases-by-building-a-mario-database/main/tutorial.json
- Click on 'start' button
- first level, first step: "Once you open a new one, type echo hello PostgreSQL into the terminal and press enter."
- I made sure I opened bash terminal in vs code since https://github.com/freeCodeCamp/learn-relational-databases-by-building-a-mario-database/blob/v2.0.0/.freeCodeCamp/test/10.test.js
const lastCommand = await getLastCommand(); assert(lastCommand[0] === 'echo' && lastCommand[1] === 'hello' && lastCommand[2] === 'PostgreSQL');
has the function getLastCommand https://github.com/freeCodeCamp/learn-relational-databases-by-building-a-mario-database/blob/v2.0.0/.freeCodeCamp/test/utils.js#L9 which is looking at .bash_history file.const getLastCommand = async (howManyBack = 0, parse = true, dir = process.cwd()) => { const pathToBashLogs = path.join(dir, '../../', '.bash_history');
- Click on 'Run' button
- See error "Test Runner Failed"
Expected behavior
not see the error "Test Runner Failed" and I am expected to successfully complete level 1 & navigate to level 2.
Desktop:
- Platform: Mac
- OS: MacOS Ventura
- Version 13.5
VSCode:
- Version 1.91.1 (Universal)
Node:
- Version v18.18.1
Git (please complete the following information):
- Version 2.39.3 (Apple Git-145)
Activity
jcandan commentedon Jan 27, 2025
I wonder if this doesn't support
zsh
.Could you possibly attempt this tutorial build from a
bash
environment?I'd check, but am currently having other issues with VS Code and CodeRoad. I'll try to circle back to this at some point.
jcandan commentedon Jan 27, 2025
Oh. I just read your attempt to accommodate with bash. Sorry I missed that. So I can assume the zsh message shown is letting you know something other than bash is default.
Confirmed this issue exists on my machine:
When I get to the first lesson, and I run
echo hello PostgreSQL
, it should run the test. It does not. If I click Run, the Test Runner Failed is shown.Desktop (please complete the following information):
Node (please complete the following information):
Git (please complete the following information):
Additional context
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
jcandan commentedon Jan 27, 2025
I can also confirm this is affecting locally built tutorials.
After overcoming #626 with the work-around described there, after uploading and starting the
tutorial.json
file from Open your tutorial, it is **not ** running the test when I create theindex.html
file, nor passing when hitting run.jcandan commentedon Jan 27, 2025
Well, I just attempted to run my instance of Create a Practice Tutorial in Gitpod by borrowing from freeCodeCamp's implementations, but still couldn't get it to run or pass a test.
Start Gitpod with jcandan/first-coderoad-tutorial
So, there's something wrong with my implementation, perhaps. Therefore, my confirmation is still only that the mario database project from the original post is having this issue. My project can't be considered an additional confirmation.
jcandan commentedon Feb 5, 2025
I think I have the steps needed:
CodeRoad: Start
from the Command Pallete.git init
.#629 may help to address documentation or user experience issues.
Let us know if the above steps help resolve being able to run tutorials locally.