skills / code-with-codespaces

Develop code using GitHub Codespaces and Visual Studio Code!
MIT License
220 stars 441 forks source link

[Bug] Using 'setup.sh' in step 4 doesn't work #98

Closed czmoss closed 2 months ago

czmoss commented 3 months ago

Summary

Using a file named 'setup.sh' in step 4 does not work to initiate installation of dotfiles (or, as this course has it, the sl steam locomotive).

How to reproduce

  1. Follow the course to step 4.
  2. Create setup.sh with the sudo apt-get lines, as instructed.
  3. Create a new Codespace, as instructed.
  4. Wait while the Codespace is set up.
  5. Try running /usr/games/sl
  6. See the following error.
    bash: /usr/games/sl: No such file or directory

Expected results and acceptance criteria

Additional context

I found that instead by using a file named 'install.sh', as documented in Personalize your codespaces#Dotfiles, during my "How to reproduce" step 4 (i.e., "Wait while the Codespace is set up.") I saw an "Installing Dotfiles" progress indicator in the terminal area.

image

nguyenalex836 commented 3 months ago

@czmoss Thank you for opening this issue, and submitting a PR with a fix! We will get this issue groomed ✨

hectorsector commented 3 months ago

Thanks for reporting this issue, @czmoss ❤. I updated the OP with acceptance criteria and a suggestion on how to resolve this. The path isn't being set in setup.sh. The doc on persisting environment variables may help. One way it suggests to achieve this is to set the PATH from .devcontainer.json in postCreateCommand.

czmoss commented 2 months ago

Thanks for the replies, @nguyenalex836 and @hectorsector! It's great to see that these courses are being actively maintained.

As I indicated in the comment I just posted on my now-closed PR #99, my specific issue was that my dotfiles were not being installed, but that upon just redoing this course I am seeing that they are.

I, personally, had no problems typing /usr/games/sl, and saw no need, myself, for #83. Again, it was just that for me the steam locomotive "game" wasn't being installed at all. Given that I saw no need for #83, I also saw no need for #103, which is where I think the current aberrant behavior you have repurposed this issue to address was introduced. (To be clear, I have no problem that you repurposed my issue.)

It is of course in your hands to determine whether the learning goals for this course are best addressed by expanding its scope slightly to include a discussion of environment variables and persisting them. I wish you luck!

rustedredswitch commented 2 months ago

Hello, I have wrote a fix for these bug, I opened a pull request Link to 106 Enjoy 👍🏼