From 306375f894bee026fa27e4ced4380f238eca913d Mon Sep 17 00:00:00 2001 From: Matt Clarkson Date: Wed, 12 Feb 2025 09:19:08 +0000 Subject: [PATCH] fix: use `shlex.split` to read `ctx.actions.write` arguments --- patchelf/launcher/launch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patchelf/launcher/launch.py b/patchelf/launcher/launch.py index 3a28e51..eef2bc6 100644 --- a/patchelf/launcher/launch.py +++ b/patchelf/launcher/launch.py @@ -4,6 +4,7 @@ from argparse import REMAINDER, ArgumentParser from logging import getLogger from os import environ, getpid from pathlib import Path, PurePath +from shlex import split from shutil import move from subprocess import CalledProcessError, run from sys import argv, exit @@ -122,7 +123,7 @@ def execute( class BazelArgumentParser(ArgumentParser): def convert_arg_line_to_args(self, line): - return (line.removeprefix("'").removesuffix("'"),) + return split(line) def main(exe: Path, *args: str) -> int: -- GitLab