cannot create snippet from stdin
no open bug for this https://gitlab.com/gitlab-org/cli/-/issues/?sort=created_date&state=opened&search=snippet&label_name%5B%5D=bug&first_page_size=20
Checklist
See below for versions.
-
I'm using the latest version of the extension (Run
glab --version)- Extension version: glab 1.86.0 (1ef884a6)
- Operating system and version: Ubuntu 24.04.4 LTS
- Gitlab.com or self-managed instance? gitlab.com
-
I have performed
glab auth statusto check for authentication issues -
Run the command in debug mode (like
DEBUG=true glab mr list) and attach any useful output
Summary
unable to create gist^H^H^H^Hsnippet from stdin
Environment
- OS: Ubuntu 24.04.4 LTS
- SHELL: fish 3.7.0
- TERM: ghostty 1.2.3
- GLAB: glab 1.86.0 (1ef884a6)
Other:
Steps to reproduce
What is the current bug behavior?
Using example from docs: https://docs.gitlab.com/cli/snippet/create/
set DEBUG true echo "package main" | glab snippet new --title "Title of the snippet" --filename "main.go"
[git remote -v]
[git remote -v]
ERROR
Stdin required if no 'path' is provided.
What is the expected correct behavior?
create snippet
Relevant logs and/or screenshots
see above
begin; set -lx DEBUG true; echo 'test' | glab snippet create --title 'test'; end
[git remote -v]
ERROR
If 'path' is not provided, 'filename' and stdin are required.
Possible fixes
presumably in how it checks whether bytes were received from stdin
Edited by AVA