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

Terminals launching using terminal.integrated.cwd do not check for invalid paths #17450

Closed
Tyriar opened this issue Dec 17, 2016 · 9 comments · Fixed by #76743
Closed

Terminals launching using terminal.integrated.cwd do not check for invalid paths #17450

Tyriar opened this issue Dec 17, 2016 · 9 comments · Fixed by #76743
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities terminal Integrated terminal issues verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Dec 17, 2016

Invalid paths will cause the terminal to start at terminalProcess.js' dir.

@Tyriar Tyriar added debt Code quality issues terminal Integrated terminal issues labels Dec 17, 2016
@Tyriar Tyriar added this to the Backlog milestone Dec 17, 2016
@Tyriar Tyriar self-assigned this Dec 17, 2016
@millergarym
Copy link

Is a variable a valid option to terminal.integrated.cwd?
If so what variables?
eg the directory of the current active document.

This would replace the need for @Tyriar's addin.
https://marketplace.visualstudio.com/items?itemName=Tyriar.vscode-terminal-here

#17387 (comment)
#15531 (comment)

@Tyriar
Copy link
Member Author

Tyriar commented Jul 28, 2017

@millergarym created #31677

@Tyriar Tyriar closed this as completed Jul 28, 2017
@Tyriar Tyriar reopened this Jul 28, 2017
@Tyriar Tyriar added the help wanted Issues identified as good community contribution opportunities label Jul 28, 2017
@lifez
Copy link
Contributor

lifez commented Aug 1, 2017

@Tyriar Would you suggest me to work on this thing and #31677

@Tyriar
Copy link
Member Author

Tyriar commented Aug 21, 2017

Sorry for the delay, anything with the help wanted label is up for grabs 😃

@sylann
Copy link

sylann commented May 6, 2018

I'm sorry if it's not the correct issue to post this. I came here from following a bunch of now closed issues.
So in case it could help you figure out what's wrong with this:
I am having the very same error as described by @siegebell here.
It started just after I upgraded budgie 17.10 (based on ubuntu) to 18.04

It happens only if all 3 of these conditions are met:

  1. I have no terminal opened in the current instance of vscode.
  2. I have several folders opened in the workspace
  3. I have no terminal.integrated.cwd specified (more on this below).

More details:

If I use the command workbench.action.terminal.new instead of the command workbench.action.terminal.toggleTerminal,
it prompts me to chose one of the opened folders in the workspace, and the terminal always starts successfully in this case.

When trying to toggle the terminal (without any currently opened):
The terminal fails to start with: terminal.integrated.cwd set to either ~ or $HOME.
But the terminal starts successfully with a static value such as /home/myusername.

@Amanej
Copy link

Amanej commented Dec 29, 2018

I have the same issue as #56849 , is there any solution to do this ?

Split Terminal used to work, but now just trows
'chdir(2) failed'
and
'The terminal process command '/bin/bash -l' failed to launch (exit code: 1)'

@timdmackey
Copy link

timdmackey commented Jan 8, 2019

I noticed this problem for the first time today. I get the same chdir(2) failed error when I try to split the terminal.

  • The issue occurs whenever I use the "Split Terminal" command.
  • Using the "New Terminal" command does not throw this error.

@timdmackey
Copy link

After investigating a little further, the problem in my case is being caused by a unicode character in my file path. One of the folders in my file path is Tim’s Documents, and the apostrophe (right single quote) is the root of the problem. Removing that character from the folder name fixes it.

I'm not sure why this only shows up with the "Split Terminal" command, though.

@Tyriar
Copy link
Member Author

Tyriar commented Jan 8, 2019

@timdmackey the cwd in split terminal is driven by this:

image

It sounds like inherited (likely) breaks when it contains a '? Can you create a new issue for this?

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug and removed debt Code quality issues labels Jan 24, 2019
@Tyriar Tyriar modified the milestones: Backlog, July 2019 Jul 5, 2019
@lramos15 lramos15 added the verified Verification succeeded label Jul 31, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities terminal Integrated terminal issues verified Verification succeeded
Projects
None yet
7 participants