Warn when build files use `object.path()` in places where `object` should be used
#2,742 创建于 2017年12月6日
仓库指标
- 星标
- (4,978 个星标)
- PR 合并指标
- (平均合并 139天 13小时) (30 天内合并 51 个 PR)
描述
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.