Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Nov 29, 2025

Commit 68c3055 removed the code that detected the -detached command-line argument and set the detached variable. However, the conditional check for $detached remained, along with a comment referencing "the code above" that no longer exists. This left orphaned code that could never execute its intended branch.

This change restores the argument detection loop that sets detached to "true" when -detached is found in the command-line arguments. The loop uses POSIX-compliant syntax to iterate through all positional parameters and check for the -detached flag.

Additionally, this change replaces the deprecated -o operator with || in the conditional test, following POSIX best practices for boolean OR operations in shell scripts.


This is an automatic backport of pull request #15036 done by Mergify.
This is an automatic backport of pull request #15037 done by Mergify.

Commit 68c3055 removed the code that
detected the `-detached` command-line argument and set the `detached`
variable. However, the conditional check for `$detached` remained, along
with a comment referencing "the code above" that no longer exists. This
left orphaned code that could never execute its intended branch.

This change restores the argument detection loop that sets `detached` to
`"true"` when `-detached` is found in the command-line arguments. The
loop uses POSIX-compliant syntax to iterate through all positional
parameters and check for the `-detached` flag.

Additionally, this change replaces the deprecated `-o` operator with
`||` in the conditional test, following POSIX best practices for boolean
OR operations in shell scripts.

(cherry picked from commit a48ea81)
(cherry picked from commit 6218d57)
@michaelklishin michaelklishin added this to the 4.1.7 milestone Nov 29, 2025
@michaelklishin michaelklishin merged commit a952738 into v4.1.x Nov 29, 2025
275 of 276 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.1.x/pr-15037 branch November 29, 2025 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants