Add auto_args

This commit is contained in:
2025-05-18 22:24:44 -04:00
parent 70a527358d
commit afa47b0bac
15 changed files with 511 additions and 47 deletions

View File

@@ -224,7 +224,10 @@ class ShellAction(BaseIOAction):
# Replace placeholder in template, or use raw input as full command
command = self.command_template.format(parsed_input)
if self.safe_mode:
args = shlex.split(command)
try:
args = shlex.split(command)
except ValueError as error:
raise FalyxError(f"Invalid command template: {error}")
result = subprocess.run(args, capture_output=True, text=True, check=True)
else:
result = subprocess.run(