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

fixed symbolic link dereference when launching shell #156

Merged

Conversation

vvavrychuk
Copy link
Contributor

Without this if we pty.spaw with cwd beeing a symbolic link,
then actually shell will be opened with cwd dereferenced.

Without this if we pty.spaw with cwd beeing a symbolic link,
then actually shell will be opened with cwd dereferenced.
@vvavrychuk vvavrychuk force-pushed the suppress-symbolic-link-dereference branch from 9a9c734 to 78d57b4 Compare October 30, 2017 08:27
@Tyriar
Copy link
Member

Tyriar commented Oct 30, 2017

@vvavrychuk by dereferenced do you mean it follows the cwd? Is this not expected/ideal?

@vvavrychuk
Copy link
Contributor Author

@Tyriar I mean suppose we have folder A being symbolic link to B. If we pass A as cwd to node-pty then after launch actual cwd will be B.

I am not sure what is ideal, but:

@Tyriar
Copy link
Member

Tyriar commented Nov 2, 2017

@vvavrychuk oh I see. Do you have a link to documentation describing the $PWD environment variable's behavior? Need to make sure this works on macOS and linux. We may also be able to create a unit test for this one.

@vvavrychuk
Copy link
Contributor Author

vvavrychuk commented Nov 9, 2017

I dropped using patch and ended up using mount --bind instead of symbolic links. Problem is that even if we change behavior in VS code, similar thing exists in other software.

@vvavrychuk vvavrychuk closed this Nov 9, 2017
@Tyriar
Copy link
Member

Tyriar commented Nov 11, 2017

@vvavrychuk I'm still open to merging this in, I just want to make sure I understand the behavior of $PWD

@Tyriar Tyriar added this to the 0.10.0 milestone Oct 24, 2019
@Tyriar Tyriar self-assigned this Oct 24, 2019
@Tyriar Tyriar reopened this Oct 24, 2019
@Tyriar
Copy link
Member

Tyriar commented Oct 24, 2019

@vvavrychuk I've learned more about this myself over time and got pinged in microsoft/vscode#59291 about it, this is totally the expected behavior as it's how cd works. Thanks for the contribution and sorry about not merging 2 years ago 🙂

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 this pull request may close these issues.

2 participants