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

tweak(environment): clean up .env-e files on macOS #5571

Merged
merged 5 commits into from
Apr 17, 2024
Merged

Conversation

jaskfla
Copy link
Contributor

@jaskfla jaskfla commented Apr 8, 2024

Changes

When using sed with the -i flag to edit a file in place, macOS generates backups of the original file. These aren’t harmful but we don’t really want or need them.

There were a few alternative ways to get around this:

  • print the file contents into a new file, and then use mv and rm to replace the old file
  • use command substitution to cat the old file into a variable, run the find and replace, then echo it into the original file with >

I think those harm readability more than it’s worth; and it has to be done every in every place we use sed -i.

@jaskfla jaskfla marked this pull request as draft April 12, 2024 04:14
Copy link
Contributor

@alexd-bes alexd-bes left a comment

Choose a reason for hiding this comment

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

🙏

previsouly assumed script was run from monorepo root
@jaskfla jaskfla marked this pull request as ready for review April 17, 2024 20:15
@jaskfla jaskfla merged commit 975ee66 into dev Apr 17, 2024
43 checks passed
@jaskfla jaskfla deleted the clean-up-env-e-files branch April 17, 2024 20:39
@jaskfla jaskfla mentioned this pull request Apr 17, 2024
1 task
@rohan-bes rohan-bes mentioned this pull request Apr 22, 2024
1 task
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