Warn when build files use `object.path()` in places where `object` should be used
#2742 aperta il 6 dic 2017
Metriche repository
- Star
- (4978 stelle)
- Metriche merge PR
- (Merge medio 139g 13h) (51 PR mergiate in 30 g)
Descrizione
If script.sh exists, has a shebang but is not executable then the following two lines will case an error when trying to invoke the run target.
myscript = find_program('script.sh')
run_target('myscript', command : myscript.path())
I could not track down the exact cause of the problem. When meson searches for the program it will recognize that the file is not executable and look for the shebang. (It might be a good idea to warn about this on *nix platforms.) It then identifies the interpreter and creates an external program with the interpreter and the script file.
When trying to invoke the program in run_script_command the interpreter is lost and we fail to execute the non-executable script.