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.

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)
@michaelklishin michaelklishin added this to the 4.2.2 milestone Nov 29, 2025
@michaelklishin
Copy link
Collaborator

@Mergifyio backport v4.1.x

@mergify
Copy link
Author

mergify bot commented Nov 29, 2025

backport v4.1.x

✅ Backports have been created

@michaelklishin michaelklishin merged commit 9c3361d into v4.2.x Nov 29, 2025
291 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.2.x/pr-15036 branch November 29, 2025 00:44
michaelklishin added a commit that referenced this pull request Nov 29, 2025
Restore `-detached` argument detection in `rabbitmq-server` (backport #15036) (backport #15037)
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