Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swc-installation-test-2.py: Also look for extension-less paths
Before this commit, CommandDependency checked self.command (with an optional extension determined by distutils). If that check failed to produce a version stream, we cycled through a list of additional hard-coded paths. For example: Notepad++ used: self.command = 'notepad++' self.paths = [ _os.path.join( _ROOT_PATH, 'Program Files', 'Notepad++', 'notepad++.exe'), ] Because some MS Windows commands lack the expected '.exe' extension, but are still present and detected by a number of shells, we should also look for the extension-less version of the command. I consolidated the _get_version_stream() logic to build a single list of paths and loop through it looking for success (and accumulating errors). This makes the handling of self.paths less of a special case, and sets us up for any additional path mangling we may need to support other poorly standardized OSes ;).
- Loading branch information