Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spinner breaks output allignment #286

Closed
realtime-neil opened this issue Feb 3, 2022 · 2 comments
Closed

spinner breaks output allignment #286

realtime-neil opened this issue Feb 3, 2022 · 2 comments
Labels
enhancement Minor fixes or improvements

Comments

@realtime-neil
Copy link
Contributor

Describe the bug

The spinner prints to stderr (which is fine) but doesn't print a final newline and flush it to the stream on completion. This results in terminal output like the following:

$ jira issue list --plain --limit 5
⠇ Fetching issues... TYPE	KEY		SUMMARY										STATUS
Task	FOOBAR-13491	Draft an integration showcase 2.0 plan in collaboration with related people	To Do
Task	FOOBAR-13490	Wire push button in parallel to the Wingnut output module board		Closed
Task	FOOBAR-13489	Run solver in Dialog from background thread				Needs Triage
Task	FOOBAR-13488	Update NumericInput component to support inline expressions + units		Needs Triage
Bug	FOOBAR-13487	Thread leak on project load/unload						Needs Triage

Note the final spinner output without the trailing newline has erroneously indented the column headings.

Please provide following details

  1. JiraCLI Version:
    (Version="v0.3.1-0.20220124201418-5429cbd9d363", GitCommit="", CommitDate="", GoVersion="go1.17.6", Compiler="gc", Platform="linux/amd64")
    
  2. Are you using Jira cloud or on-premise jira server? Also mention the version for on-premise installation.
    cloud
    
  3. What operating system are you using? Also mention version.
    Ubuntu 20.04
    
  4. What terminal are you using? Also mention version.
    # GNOME Terminal 3.36.2 using VTE 0.60.3 +BIDI +GNUTLS +ICU +SYSTEMD
    

To Reproduce

Steps to reproduce the behavior:

$ jira issue list --plain --limit 5

Expected behavior
Properly aligned column headings.

Screenshots
not applicable

Additional context
not applicable

@ankitpokhrel ankitpokhrel added the enhancement Minor fixes or improvements label Feb 3, 2022
@ankitpokhrel
Copy link
Owner

This seems to be working for me with recent changes. @realtime-neil could you please confirm and close the issue? :)

@realtime-neil
Copy link
Contributor Author

@ankitpokhrel can confirm:

$ go install github.com/ankitpokhrel/jira-cli/cmd/jira@main && jira version && nohup jira issue list --limit=1 --plain >jira-issue-list.errout 2>&1 & wait $! && cat jira-issue-list.errout 
[1] 116053
(Version="v0.3.1-0.20220301183703-3de6791019c8", GitCommit="", CommitDate="", GoVersion="go1.17.7", Compiler="gc", Platform="linux/amd64")
[1]+  Done                    go install github.com/ankitpokhrel/jira-cli/cmd/jira@main && jira version && nohup jira issue list --limit=1 --plain > jira-issue-list.errout 2>&1
nohup: ignoring input
TYPE			KEY		SUMMARY											STATUS
Internal Request	FOOBAR-14590	Want to be able to choose a connection to select between multiple collinear connections	Needs Triage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Minor fixes or improvements
Projects
None yet
Development

No branches or pull requests

2 participants