-
-
Notifications
You must be signed in to change notification settings - Fork 761
fix(lib/base): Change hyphen to underscore in banish_cookies function #729
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
base: master
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
That implies that you turn on the POSIX mode of Bash (by either setting the shell option |
Please also notice the description in 3.3 Shell Functions - Bash Reference Manual:
|
|
@akinomyoga I'm typically using OMB on Linux, only noticed this on a fresh installation of MacOS Macports and Homebrew both appear to use Besides this function, everything appears to be working as expected when I understand why OMB isn't written for POSIX compliance, but the warning seems avoidable? If the mode should be avoided entirely, why not explicitly handle this? e.g. |
|
There are two things to consider. First of all, as I have mentioned in the first reply, I don't think this is the only place where the POSIX mode causes an issue. At least, there are similar function names that cause issues within the POSIX mode: Even if we were to rename all these functions and suppress warning messages, there would be other breakages that don't output the warning messages. We need to check the codebase carefully. The next problem is that |
User description
Renamed
banish-cookiesfunction tobanish_cookiesto fix invalid identifierhttps://www.gnu.org/software/bash/manual/bash.html#index-identifier
Currently, this warning is given when
lib/bash.shis sourced (i.e. when invoking an interactive shell)PR Type
Bug fix
Description
Renamed
banish-cookiesfunction tobanish_cookiesFixed invalid bash identifier with hyphen character
Resolves bash warning when sourcing
lib/base.shDiagram Walkthrough
File Walkthrough
base.sh
Rename function with hyphen to underscorelib/base.sh
banish-cookiestobanish_cookies