Bug 447644 - Cygwin will always be started if found in path
Summary: Cygwin will always be started if found in path
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: Next   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-17 03:44 EDT by Ghaith Hachem CLA
Modified: 2020-09-04 15:24 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ghaith Hachem CLA 2014-10-17 03:44:03 EDT
If a user has Cygwin in his PATH it will always be executed in org.eclipse.cdt.core.CommandLauncher.execute(IPath commandPath, String[] args, String[] env, IPath workingDirectory, IProgressMonitor monitor)
Even if the application itself was not found, this effectively mean as soon as a user has Cygwin in path, there's no way to run other compilers.

This also happens even if Cygwin.cygwinToWindowsPath(location.toString(), envPathValue) was not called, somewhere in native code in the Starter.exe application.
Comment 1 Andrew Gvozdev CLA 2014-10-21 15:16:35 EDT
This is the way how $PATH works in general, isn't it? There are 2 ways to "run other compilers" - one is to use full (or relative) path to the program and another is to provide $PATH pointing to the program path.
What is your expectation how it should work? Could you share more details about your use case?
Comment 2 Ghaith Hachem CLA 2014-10-22 01:39:42 EDT
I agree that this is the general PATH behaviour, however the code in CommandLauncher already accounts for that and builds a cygwin path when it finds cygwin. In my case, I have a external compiler path pointing to my own make.exe (i.e. C:\[application]\[buildpath]\make.exe and cygwin still gets called to execute my own exe, which is caused by Starter.exe always calling cygwin regardless of what I specified as compiler.