Execute arguments via eval (#28)
Porting https://github.com/ROCm/omnitrace/pull/410.
As eval builtin interprets its arguments in the same way as shell would do, which would need some escape work, otherwise, it won't work if the input arguments contains e.g. a JSON string:
omnitrace-python -- ./test.py --json='{"foo": "bar"}'
[ROCm/rocprofiler-systems commit: ba0efacd3f]
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9e72fac06d
Коммит
21ae323dc8
@@ -14,4 +14,4 @@ run-script()
|
||||
eval $@
|
||||
}
|
||||
|
||||
run-script ${PYTHON_EXECUTABLE} -m @SCRIPT_SUBMODULE@ $@
|
||||
run-script ${PYTHON_EXECUTABLE} -m @SCRIPT_SUBMODULE@ "$(printf ' %q' "$@")"
|
||||
|
||||
Ссылка в новой задаче
Block a user