Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: backup extension on mac works now #221

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adthrasher
Copy link
Member

@adthrasher adthrasher commented Feb 21, 2025

With the previous solution, the bash argument wasn't being interpreted by the Mac sed version as a zero-length string. So it was appending the literal '' suffix and creating backup files. The fix is repetitive, but I can't get anything else to recognize the zero-length string properly.

Before submitting this PR, please make sure:

  • You have added a few sentences describing the PR here.
  • You have added yourself or the appropriate individual as the assignee.
  • You have added at least one relevant code reviewer to the PR.
  • The code passes all CI tests without any errors or warnings.
  • You have added tests (when appropriate).
  • You have added an entry in any relevant CHANGELOGs (when appropriate).
  • If you have made any changes to the scripts/ or docker/ directories, please ensure any image versions have been incremented accordingly!
  • You have updated the README or other documentation to account for these changes (when appropriate).

@adthrasher adthrasher self-assigned this Feb 21, 2025
@adthrasher adthrasher requested a review from a-frantz February 21, 2025 18:36
Copy link
Member

@a-frantz a-frantz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not ideal, but I'm fine with it

@adthrasher
Copy link
Member Author

adthrasher commented Feb 21, 2025

not ideal, but I'm fine with it

For the record, I tried inserting the whole argument via a substitution and just the space character. I was running short of ideas other than copy/paste the full command. I'm open to suggestions at this point.

inplace_arg="-i ''"
find . -not -path '.git' -a -type f -name '*.wdl' | xargs sed -Er $inplace_arg "s,$search_pattern,$replacement,g"
inplace_arg=" "
find . -not -path '.git' -a -type f -name '*.wdl' | xargs sed -Er -i${inplace_arg}'' "s,$search_pattern,$replacement,g"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants