Skip to content

Commit

Permalink
fix(rust): try and fix rust builder escaping because of parameter mun…
Browse files Browse the repository at this point in the history
…ging
  • Loading branch information
stevenj committed May 7, 2024
1 parent 1674079 commit 4e2e757
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion earthly/rust/scripts/std_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,19 @@ def main():
# Force color output in CI
rich.reconfigure(color_system="256")

# Fix arguments because of munging that can happen because of the rust builder +EXECUTE function
processed_args=[]
for arg in sys.argv[1:]:
print("'''"+arg+"'''")
if arg.endswith('"') and len(processed_args) > 0 and '"' in processed_args[:-1]:
processed_args[:-1] += " " + arg
else:
processed_args.append(arg)

# Replace sys.argv with the processed arguments
sys.argv = [sys.argv[0]] + processed_args

for arg in sys.argv[1:]:
print("..."+arg+"...")

parser = argparse.ArgumentParser(description="Rust build processing.")
parser.add_argument(
Expand Down

0 comments on commit 4e2e757

Please sign in to comment.