Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configuration: fix handling relative executables
Commit 720eb98 (configuration: refactorize code scanning for executables) introduced a bug when the executable is a relative path. In this case the file is always expanded, thus causing file to be always considered non executable by the code scanning through the parameters in configuration.cc. Update the look_path function to first try a file without consulting the PATH environment variable. Add the find_executable function, and update the code to check the file is not a directory instead of checking if it is a regular file, so that symlinks are handled correctly. Update the peek_file function to do the same, so that ParseManager can handle symlinks correctly. The old code worked because the last argument (before the executable arguments) was update correctly thanks to the loop over the PATH environment variable. Note that the correct solution is to add "--" before the executable arguments, but this will break the kcov cli interface.
- Loading branch information