-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Allow to set custom installation paths for supported diff tools #310
Comments
you can add VS Code and Visual studio to you PATH variable |
I did, but this is not enough. DiffEngine wants a specific executable file name and path. |
that sounds like a bug. can you submit a failing test as a Pull Request. here is a test you can look at as a basis https://github.com/VerifyTests/DiffEngine/blob/main/src/DiffEngine.Tests/OsSettingsResolverTest.cs#L21 |
I don't need to make a PR. The problem is simple and can be seen from the code. Look at this: DiffEngine/src/DiffEngine/Implementation/VsCode.cs Lines 19 to 23 in 4a90ff3
On Windows you are looking for a General thoughtsIt's not always a good idea to search the entire PATH of the system for a file named code.exe because any program can have such file and you are calling god knows what program that's named like that when you do so. Adding a custom, explicit manual configuration option would prevent such mistakes and give the user control over what's being done by DiffEngine in our systems. I've already set up a |
given on your machine |
closing this for now. if u can share a failing unit test as a PR we can look at it again |
Another way to make it work is to put the entire Vs Code installation folder in the PATH, isntead of just the bin folder |
In that case it finds the Code.exe file |
@SimonCropp can you make it look for either a |
yep. and isnt that the fix for you? |
It would be, but I'd rather avoid adding that folder to the path given that it's necessary just for DiffEngine. |
I want to stress the fact that forcing a parsing of the system PATH it's not a very good practice in general. One should be able to configure exact specific paths to executables of their diff programs. This avoids mistakes and confusion on which executable the engine is running in case of multiple installation of the same program and some other edge cases... |
if u want to do a pull request for that, i am happy to consider it |
Is the feature request related to a problem
I have a custom installation folder for both VS Code and Visual studio. The search paths for these diff tools don't match with the ones hard-coded inside DiffEngine.
Describe the solution
One should be able to set a custom path for diff tools, for example with the help of environment variables.
For example:
DiffEngine_<DiffToolName>_Path
=D:\My\Folder\
Describe alternatives considered
As alternative, consider reading a configuration file in the home directory of the user or in the project folder.
Additional context
If necessary ask me.
The text was updated successfully, but these errors were encountered: