gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
12.7k stars 1.21k forks source link

Using dotfiles to Append to ~/.bashrc Causes Workspace to Stop Immediately After Starting When VS Code Desktop Is Selected #13846

Open jimmybrancaccio opened 1 year ago

jimmybrancaccio commented 1 year ago

Bug description

When using the dotfiles feature AND attempting to add a new file into $HOME/.bashrc.d/ OR appending to $HOME/.bashrc AND having your IDE preference selected to VS Code Desktop, the workspace is unable to start up. The workspace seems to go through the Initializing Content step, but then stops.

This video shows me trying to start a workspace with VS Code Desktop selected under Settings > Preferences:

https://www.loom.com/share/f45019e94b2a48cab4c063e2a96563a1

This video shows me trying to start a workspace with VS Code Browser selected:

https://www.loom.com/share/f2ca8c85d0d04162958ebb111e3fa95d

As you can see in the former video the workspace just stops. The later video shows the workspace coming up in my web browser.

Steps to reproduce

  1. Create a new repository on GitHub.
  2. Within your new repository create a file install.sh with the following content:

    #!/bin/bash
    
    brew install starship
    echo 'eval "$(starship init bash)"' >> $HOME/.bashrc
  3. Make sure to make your install.sh file executable (ex. chmod +x ./install.sh).
  4. Go to https://gitpod.io/preferences and select VS Code as your IDE.
  5. Scroll down and input the URL of your new dotfiles repo into the 'Repository URL' under the Dotfiles section.
  6. Click on the 'Save Changes' button.
  7. Now navigate to https://gitpod.io/workspaces and open a new workspace.
  8. Observe the workspace starting up and then stopping.

Workspace affected

No response

Expected behavior

I would expect that the workspace start up and prompt me to open in VS Code and if it fails too tell me why it's not and instead stopping.

Example repository

You can use my dotfiles repo if you'd like - https://github.com/jimmybrancaccio/starship-dotfiles/blob/main/install.sh

This is the test repo I am using to create my workspace from - https://github.com/jimmybrancaccio/gitpod-test

Anything else?

No response

Front logo Front conversations

benvp commented 1 year ago

Thanks for creating this issue. To add a little more info:

  1. When using VSCode browser and doing cmd+p -> Open in VSCode it works.

Don't know if it helps, but the same issue also occurs if you just add a exit 1 to your dotfiles...

axonasif commented 1 year ago

Related: https://github.com/gitpod-io/gitpod/issues/12100