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

No sed backup file #11624

Merged
merged 1 commit into from
Feb 21, 2024
Merged

No sed backup file #11624

merged 1 commit into from
Feb 21, 2024

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Feb 14, 2024

No description provided.

@rvagg rvagg requested a review from a team as a code owner February 14, 2024 21:31

find . -type f -name \*.go.ifixbak | xargs rm
# Because -i works differently on macOS, we need to use a different sed command
if [[ "$OSTYPE" == "darwin"* ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

not guaranteed to be defined?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think if you don't have it defined you have bigger problems than this script defaulting to the gnu sed

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I didn't realize this was a bash thing. Nvm.

find . -type f -name \*.go.ifixbak | xargs rm
# Because -i works differently on macOS, we need to use a different sed command
if [[ "$OSTYPE" == "darwin"* ]]; then
go_files | xargs -I '{}' sed -i '' -e "$sed_replace" '{}'
Copy link
Member

Choose a reason for hiding this comment

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

Can we not just specify the suffix anyways?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see. Also, I absolutely hate macos.

Do we even need this? Can we just not delete these lines?

Copy link
Member Author

Choose a reason for hiding this comment

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

I personally don't need it. But are you willing to move Chesterton's fence?

Copy link
Member

Choose a reason for hiding this comment

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

Ah... I see why it's there. It's there because we add a bunch of newlines and goimports won't ungroup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ☑️ Done (Archive)
Development

Successfully merging this pull request may close these issues.

3 participants