Description
Symbol "@" in all parameter values parsed as file reference, and I found no way to override this behaviour.
|
def _parse_value(v: Any) -> Any: |
|
if isinstance(v, str) and v.startswith("@"): |
|
# If the user-provided value starts with @, we try to read the file |
|
# path provided after @ as the real value. Exit on any error. |
|
try: |
|
with open(v[1:], encoding="utf-8") as f: |
|
return f.read() |
|
except Exception as e: |
|
sys.stderr.write(f"{e}\n") |
|
sys.exit(1) |
|
|
|
return v |
Expected Behavior
gitlab project-tag delete --project-id somenamespace/myproject --name '@at-started-tag'
Command executed without errors and tag is deleted.
Actual Behavior
$ gitlab project-tag delete --project-id somenamespace/myproject --name '@at-started-tag'
[Errno 2] No such file or directory: 'at-started-tag'
Description
Symbol "
@" in all parameter values parsed as file reference, and I found no way to override this behaviour.python-gitlab/gitlab/cli.py
Lines 274 to 285 in 9c24657
Expected Behavior
Command executed without errors and tag is deleted.
Actual Behavior