Remove deprecated --enable-system-operator alias; use --security-enable-system-operator consistently

Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/286b95e9-b6d7-4ab8-b401-2d7a03853922

Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-06 08:35:36 +00:00
committed by GitHub
co-authored by mikefarah
parent e10e8127e1
commit b3b4478839
5 changed files with 15 additions and 19 deletions
@@ -2,12 +2,12 @@
The `system` operator allows you to run an external command and use its output as a value in your expression.
**Security warning**: The system operator is disabled by default. You must explicitly pass `--enable-system-operator` to use it.
**Security warning**: The system operator is disabled by default. You must explicitly pass `--security-enable-system-operator` to use it.
## Usage
```bash
yq --enable-system-operator --null-input '.field = system("command"; "arg1")'
yq --security-enable-system-operator --null-input '.field = system("command"; "arg1")'
```
The operator takes:
@@ -20,4 +20,4 @@ The current matched node's value is serialised and piped to the command via stdi
The system operator is disabled by default. When disabled, a warning is logged and `null` is returned instead of running the command.
Use `--enable-system-operator` flag to enable it.
Use `--security-enable-system-operator` flag to enable it.
+7 -7
View File
@@ -2,12 +2,12 @@
The `system` operator allows you to run an external command and use its output as a value in your expression.
**Security warning**: The system operator is disabled by default. You must explicitly pass `--enable-system-operator` to use it.
**Security warning**: The system operator is disabled by default. You must explicitly pass `--security-enable-system-operator` to use it.
## Usage
```bash
yq --enable-system-operator --null-input '.field = system("command"; "arg1")'
yq --security-enable-system-operator --null-input '.field = system("command"; "arg1")'
```
The operator takes:
@@ -20,10 +20,10 @@ The current matched node's value is serialised and piped to the command via stdi
The system operator is disabled by default. When disabled, a warning is logged and `null` is returned instead of running the command.
Use `--enable-system-operator` flag to enable it.
Use `--security-enable-system-operator` flag to enable it.
## system operator returns null when disabled
Use `--enable-system-operator` to enable the system operator.
Use `--security-enable-system-operator` to enable the system operator.
Given a sample.yml file of:
```yaml
@@ -39,7 +39,7 @@ country: null
```
## Run a command with an argument
Use `--enable-system-operator` to enable the system operator.
Use `--security-enable-system-operator` to enable the system operator.
Given a sample.yml file of:
```yaml
@@ -47,7 +47,7 @@ country: Australia
```
then
```bash
yq --enable-system-operator '.country = system("/usr/bin/echo"; "test")' sample.yml
yq --security-enable-system-operator '.country = system("/usr/bin/echo"; "test")' sample.yml
```
will output
```yaml
@@ -63,7 +63,7 @@ a: hello
```
then
```bash
yq --enable-system-operator '.a = system("/usr/bin/echo")' sample.yml
yq --security-enable-system-operator '.a = system("/usr/bin/echo")' sample.yml
```
will output
```yaml