glab variable export does not output clean data on stdout
When using glab variable export -F json (the default), the output sent over stdout is not a valid json document as it is prefixed with "Exporting variables from the project/path project:":
Exporting variables from the bauwatch/infrastructure/terraform project:
[
{
"key": "...",
"value": "...",
"variable_type": "file",
"protected": false,
"masked": false,
"hidden": false,
"raw": true,
"environment_scope": "*",
"description": "..."
},
...
]
This causes tools like jq to fail to parse.
Steps to reproduce:
Inside a GitLab cloned project, run:
glab variable export -F json | jq .
This results in:
jq: parse error: Invalid numeric literal at line 1, column 10
Expected result
jq is able to parse the output, and presents it in a formatted way and allows filtering.