2
0

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"}'
Este cometimento está contido em:
David Galiffi
2024-11-14 13:26:52 -05:00
cometido por GitHub
ascendente 51446f715f
cometimento ba0efacd3f
+1 -1
Ver ficheiro
@@ -14,4 +14,4 @@ run-script()
eval $@
}
run-script ${PYTHON_EXECUTABLE} -m @SCRIPT_SUBMODULE@ $@
run-script ${PYTHON_EXECUTABLE} -m @SCRIPT_SUBMODULE@ "$(printf ' %q' "$@")"