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

Should not panic in init if SupportANSI is false #4

Open
easeway opened this issue Mar 23, 2016 · 1 comment
Open

Should not panic in init if SupportANSI is false #4

easeway opened this issue Mar 23, 2016 · 1 comment

Comments

@easeway
Copy link

easeway commented Mar 23, 2016

I'm writing a program supporting both interactive/non-interactive mode (e.g. the cli is running in a pipe), the following init function crashes my program in non-interactive mode:

func init() {
    if !term.SupportANSI() {
        panic("Your terminal does not support ANSI")
    }
}
@easeway
Copy link
Author

easeway commented Mar 23, 2016

NewLine can return error after the global variables are moved to Terminal, see issue #3

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

No branches or pull requests

1 participant