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

[vscode-X] Fix "Open in integrated terminal" #178

Closed
cdugeai opened this issue Nov 27, 2024 · 3 comments · Fixed by InseeFrLab/images-datascience#236
Closed

[vscode-X] Fix "Open in integrated terminal" #178

cdugeai opened this issue Nov 27, 2024 · 3 comments · Fixed by InseeFrLab/images-datascience#236

Comments

@cdugeai
Copy link

cdugeai commented Nov 27, 2024

In the file explorer, when right-clicking on a file then "Open in integrated terminal", the terminal still opens at path /home/onyxia/work

Probably due to:

# .bashrc#L112
cd /home/onyxia/work

Tested on vscode-r

@avouacr
Copy link
Member

avouacr commented Dec 5, 2024

Hi @cdugeai, indeed I can reproduce the bug and you correctly identified the cause. That being said, I'm probably enclined to leave as is because the whole point of forcing this configuration for the working directory is that we mount persistent volumes at /home/onyxia/work/, and so we want to enforce this directory for users to work in. If we leave the default instead, the terminal will open at /home/onyxia/ and so if the container crashes, the whole working data of the user will be lost. So even if this rule has undesired consequences like you point out, I think the pro outweighs the con, given that users can always cd into their desired directory.

Note that their could be specific configuration in the VSCode API that enables to properly configure this, something to keep in mind for possible evolutions @ihiverlet

@cdugeai
Copy link
Author

cdugeai commented Dec 9, 2024

I think this behaviour is not incompatible with what you want. Because the explorer default folder is work, all the files and folders in the explorer panel are inside of the work directory. So if we click on any visible folder and Open in Integrated Terminal, the terminal would open in a subdirectory of work.

For instance here, if I right click dir2.1 -> Open in Integrated Terminal, it should open in /home/onyxia/work/dir2/dir2.1 that is still in the persistent volume:

image

@ihiverlet
Copy link
Contributor

ihiverlet commented Jan 9, 2025

Hi @cdugeai , thank you for letting us know about the bug !
The correction should take effect starting monday (after we build the images).
Deleting the bloc of code you pointed out worked fine. The terminal opens at /home/onyxia/work by default because we provided the correct environment variable in the images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants