-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
No sed backup file #11624
Conversation
81dd3e9
to
0dc20bb
Compare
|
||
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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" '{}' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
No description provided.