Commit c5f0c35
Restore
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)-detached argument detection in rabbitmq-server
1 parent 138a30d commit c5f0c35
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
102 | 107 | | |
103 | | - | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
0 commit comments