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

shims/super/cc: run in bash shell #12086

Merged
merged 2 commits into from Sep 18, 2021
Merged

shims/super/cc: run in bash shell #12086

merged 2 commits into from Sep 18, 2021

Conversation

dawidd6
Copy link
Member

@dawidd6 dawidd6 commented Sep 17, 2021

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Should fix errors like this one:

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-5: 3: /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-5: [[: not found

I don't know if there is any special reason we run this particular shim via plain sh.

Found here: https://github.com/Homebrew/homebrew-core/pull/85282/checks?check_run_id=3624010217

Bug introduced in: #12044

@BrewTestBot
Copy link
Member

Review period will end on 2021-09-20 at 20:17:21 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Sep 17, 2021
@Bo98
Copy link
Member

Bo98 commented Sep 17, 2021

Hmm:

  expected that /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/super/cc is a valid Bash file:
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/super/cc: line 28: syntax error near unexpected token `('
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/super/cc: line 28: `  CXX_REGEX = /(?:c|g|clang)\+\+/.freeze'

@Bo98 Bo98 added the critical Critical change which should be shipped as soon as possible. label Sep 17, 2021
@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Sep 17, 2021
@BrewTestBot
Copy link
Member

Review period skipped due to critical label.

@Bo98 Bo98 merged commit 12d5e70 into master Sep 18, 2021
@Bo98 Bo98 deleted the cc-bash branch September 18, 2021 02:56
@XuehaiPan
Copy link
Contributor

XuehaiPan commented Sep 19, 2021

Probably similar issue for shims/mac/super/pkg-config. This is the last shell file that uses shebang #!/bin/sh in this repo.

#!/bin/sh
# HOMEBREW_OPT and HOMEBREW_SDKROOT are set by extend/ENV/super.rb
# shellcheck disable=SC2154
pkg_config="${HOMEBREW_OPT}/pkg-config/bin/pkg-config"
if [[ -z "${HOMEBREW_SDKROOT}" ]]
then
exec "${pkg_config}" "$@"
fi

@github-actions github-actions bot added the outdated PR was locked due to age label Oct 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
critical Critical change which should be shipped as soon as possible. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants