fix(cron): bound profile flag lifecycle scan
(cherry picked from commit 9546b9dd687606d676799b50a0df6e136fc6db8a)
This commit is contained in:
@@ -247,11 +247,11 @@ _PROFILE_FLAG_LIFECYCLE_PATTERN = re.compile(
|
||||
r"(?i)"
|
||||
r"hermes\s+"
|
||||
# Any global flags before the profile selector (each may carry a value).
|
||||
r"(?:-{1,2}\S+(?:\s+\S+)?\s+)*"
|
||||
r"(?:-{1,2}\S+(?:\s+(?!-)\S+)?\s+){0,12}"
|
||||
# The selector: exactly the shapes the CLI's `_apply_profile_override` accepts.
|
||||
r"(?:--profile=([^\s]+)|(?:-p|--profile)\s+([^\s]+))"
|
||||
# Any global flags between the selector and the subcommand.
|
||||
r"(?:\s+-{1,2}\S+(?:\s+\S+)?)*"
|
||||
r"(?:\s+-{1,2}\S+(?:\s+(?!-)\S+)?){0,12}"
|
||||
r"\s+gateway\s+(?:restart|stop)"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user