Skip to content

`glab ci status </dev/null` hangs

Checklist

  • I'm using the latest version of the extension (Run glab --version)
    • Extension version: Put your extension version here
  • Operating system and version: Put your version here
  • Gitlab.com or self-managed instance? gitlab.com/self-managed instance/both
  • GitLab version (if self-managed) GitLab version here (Use the version endpoint, like this: gitlab.my-company.com/api/v4/version)
  • I have performed glab auth status to check for authentication issues

Summary

glab ci status attempts to read from the terminal connected to standard input, even such a terminal is missing.

Steps to reproduce

glab ci status </dev/null

What is the current bug behavior?

glab ci status </dev/null hangs in a tight loop, waiting for user input that will never come, via a stdin terminal that doesn't exist.

What is the expected correct behavior?

Don't prompt for input when stdin terminal is missing.

Relevant logs and/or screenshots

On my host, glab ci status consumes bytes reasonably slowly. I don't know if this is good/bad, expected/surprising:

$ timeout --signal=INT 5s dd if=/dev/zero | glab ci status
(success) � 00m 45s    release         windows_installer
(success) � 08m 47s    release         release_test
(success) � 01m 51s    test            build_windows
(success) � 03m 42s    test            run_tests: [1.20]
(success) � 03m 26s    test            run_tests: [1.19]
(success) � 01m 41s    test            code_navigation
(success) � 02m 00s    test            lint
(success) � 01m 19s    test            license_scanning
(success) � 00m 21s    test            secret_detection
(success) � 00m 38s    test            gemnasium-dependency_scanning
(success) � 00m 42s    test            semgrep-sast
(success) � 00m 37s    test            nodejs-scan-sast

https://gitlab.com/gitlab-org/cli/-/pipelines/971111426
SHA: 62e128674ecd4b66f7a8aab9f7ce8e53fbcf6f53
Pipeline State: success

169+0 records in
168+0 records out
86016 bytes (86 kB, 84 KiB) copied, 4.99854 s, 17.2 kB/s

Possible fixes

forthcoming

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information