PreAction scripts are not properly escaped
mobileben opened this issue · comments
I was using XcodeGen
to build a scheme that contained a PreAction script. I created it using YML which looked like the following (only part of it)
preActions:
- name: Bootstrap Script
script: |+
#!/bin/bash
# Update xcconfig and yaml or remove if doesn't exist
# yaml probably should go elsewhere but for making this easier right now, this is where they all go
XCCONFIG="Custom.xcconfig"\n
FRAMEWORKS_YAML="frameworks.yml"
RESOURCES_YAML="resources.yml"
When examining the results in Xcode, the script occupied a single line. Since it starts with a she-bang, everything was commented out.
In a more simple case
Using a script of
script: |+
A
B
C
I would expect that if I look at this the xcscheme
file, the results should look like:
scriptText = "A B C ">
However in actuality, the entry looks like this:
scriptText = "A
B
C
">
I've traced the code and it does seem it is passed downstream as expected. So for example if I set a breakpoint in XCScheme-ExecutionAction.swift
in xmlElement()
(roughly line 31). I can see that
self.scriptText == "A\nB\nC\n"
element
and content
also still have \n
in its attributes
. This is not translating to the xcscheme
file.
I have an issue opened there related to this (and some other stuff). yonaskolb/XcodeGen#806
Hey @mobileben. Thanks for reporting this! Unfortunately, we can prioritize fixing this but if you'd like to go ahead and fix the issue yourself you are welcome to do. I'll happily review it.
Hola 👋,
We want to inform you that the issue has been marked as stale. This means that there hasn't been any activity or updates on it for quite some time, and it's possible that it may no longer be relevant or actionable.
If you still believe that this issue is valid and requires attention, please provide an update or any additional information that can help us address it. Otherwise, we may consider closing it in the near future.
Thank you for your understanding.
Hola 👋,
We want to inform you that we have decided to close this stale issue as there hasn't been any activity or response regarding it after marking it as stale.
We understand that circumstances may have changed or priorities may have shifted, and that's completely understandable. If you still believe that this issue needs to be addressed, please feel free to reopen it and provide any necessary updates or additional information.
We appreciate your understanding and look forward to your continued contributions to the project.
Thank you.