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]
Этот коммит содержится в:
David Galiffi
2024-11-14 13:26:52 -05:00
коммит произвёл GitHub
родитель 9e72fac06d
Коммит 21ae323dc8
+1 -1
Просмотреть файл
@@ -14,4 +14,4 @@ run-script()
eval $@
}
run-script ${PYTHON_EXECUTABLE} -m @SCRIPT_SUBMODULE@ $@
run-script ${PYTHON_EXECUTABLE} -m @SCRIPT_SUBMODULE@ "$(printf ' %q' "$@")"