chore: remove "function" keywords from bash scripts#70
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the function keyword from all bash function definitions in scripts/make-release.sh, aligning with POSIX-compatible bash syntax and the project's existing convention (as demonstrated in scripts/update-gitignore.sh). The Script Core Version is also updated to reflect the current date.
Key Changes:
- Removed
functionkeyword from 13 function definitions, converting them toname() {syntax - Added missing parentheses to
abortfunction definition (wasfunction abort {, nowabort() {) - Updated Script Core Version from 2025.08.24 to 2025.12.03
Comments suppressed due to low confidence (1)
scripts/make-release.sh:118
sed_icreates a predictable temporary file (local temp="$file.$$.$RANDOM") in the target file's directory and writes to it. An attacker with write access to that directory can pre-create a symlink with that name to another path, causingsed/mvto overwrite arbitrary files. Usemktempto create a securely randomized temp file and ensure the temp file is created with safe permissions, e.g.,
local temp
temp=$(mktemp "${file}.XXXXXX") || abort "mktemp failed"
sed "$@" >"$temp" && mv -f "$temp" "$file" local temp="$file.$$.$RANDOM"
if sed "$@" >"$temp"; then
mv "$temp" "$file"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
Copilot's suggestion for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.