Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
czmoss opened this issue Jun 12, 2024 · 4 comments
Closed

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

czmoss opened this issue Jun 12, 2024 · 4 comments
Labels
bug Something isn't working needs engineering Requires engineering-specific changes only.

Comments

@czmoss
Copy link

czmoss commented Jun 12, 2024

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

  • echo $PATH should contain /usr/games.
    • One way this can be achieved is by adding export PATH=$PATH:/usr/games >> ~/.bashrc to devcontainer.json under postCreateCommand.
  • Running sl from the home directory should work.

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

@czmoss czmoss added the bug Something isn't working label Jun 12, 2024
@nguyenalex836
Copy link

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

@hectorsector hectorsector added the needs engineering Requires engineering-specific changes only. label Jul 1, 2024
@hectorsector
Copy link
Contributor

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
Copy link
Author

czmoss commented Jul 6, 2024

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs engineering Requires engineering-specific changes only.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants