Removes the given key. This doesn't follow symlinks, to avoid accidentally modifying a file at a potentially untrusted path.
(ctx: click.Context, key: Any)
| 152 | @click.pass_context |
| 153 | @click.argument("key", required=True) |
| 154 | def unset(ctx: click.Context, key: Any) -> None: |
| 155 | """ |
| 156 | Removes the given key. |
| 157 | |
| 158 | This doesn't follow symlinks, to avoid accidentally modifying a file at a |
| 159 | potentially untrusted path. |
| 160 | """ |
| 161 | file = ctx.obj["FILE"] |
| 162 | quote = ctx.obj["QUOTE"] |
| 163 | success, key = unset_key(file, key, quote) |
| 164 | if success: |
| 165 | click.echo(f"Successfully removed {key}") |
| 166 | else: |
| 167 | sys.exit(1) |
| 168 | |
| 169 | |
| 170 | @cli.command( |
nothing calls this directly
no test coverage detected
searching dependent graphs…