-
Notifications
You must be signed in to change notification settings - Fork 218
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
Modify the logic to allow terminal emulators to be installed outside /usr/bin
#752
Conversation
Modify the logic to allow terminal emulators to be installed outside `/usr/bin`
This is a Unix-only patch, and I don't know why the "Windows Debug" check failed |
@dotnet-bot test this please |
@pieandcakes Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave a comment
private string _terminalPath; | ||
private string _bashCommandPrefix; | ||
|
||
private bool ExistInPath(string fileName) | ||
{ | ||
if (File.Exists(fileName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check seems invalid now, unless you are checking /usr/bin/.
I think the proper thing should be to short circuit it with a /usr/bin/ and if it isn't there, then allow it to search path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, only but it's customary to maintain a backward compatibility 😂
Is the goal to support specifically if the user has gnometerminal installed twice, that it uses path to determine where it is? Or are you trying to support checking path for these apps instead of only assuming the one installed is in /usr/bin? |
Yeah, I have XTerm installed in |
This check may be modified some time in the future because there are complaints about the extra terminal window while Visual Studio Code have its own internal one microsoft/vscode-cpptools#35 |
I think the right fix would be to return the string that gnometerminal is found in and start the search with |
What if someone just want to override the one installed under However, your idea will make the code more neat and descriptive. |
@amtlib-dot-dll We removed the requirement for terminal clients by switching to the use of VSCode Debug Protocol's RunInTerminalRequest. This will allow you to specify the terminal client through the VS Code settings instead and will not need us to set it. For more information on how to change that setting, look at microsoft/vscode-cpptools#2998. |
For example, one may install a newer version of GNOME Terminal or XTerm in
~/.local/bin
or somewhere else