allow arguments for commands running in container (allow escaping hyphens)

This commit is contained in:
askiiart 2025-04-08 15:27:57 -05:00
parent c8dafc0826
commit f7c5507d92
Signed by untrusted user who does not match committer: askiiart
GPG key ID: 6A32977DAF31746A

1
user
View file

@ -208,6 +208,7 @@ def exec_c(container, cmds):
exit(1)
creation_env = os.environ.copy()
creation_env['BLEND_NO_CHECK'] = 'true'
cmds = [ cmd.replace('\\-', '-') for cmd in cmds]
subprocess.run(['blend', 'enter', '-cn', container, '--', *cmds], env=creation_env)