smallstep / cli-utils Goto Github PK
View Code? Open in Web Editor NEWCommon code between step and step-ca
License: Apache License 2.0
Common code between step and step-ca
License: Apache License 2.0
Since f41a85a, Caddy users on Windows have had their terminals break after running any caddy
CLI command, because the console mode never gets reset.
See caddyserver/caddy#4251 for details.
I suggest that the code in ui/ui_windows.go
is changed to only get invoked at the CLI entrypoints for smallstep instead of inside of an init()
so that it doesn't clobber terminal state. Ideally, for smallstep users, the terminal state should get reset before the commands exit as well.
This could be done with a ui_other.go
which is a no-op on other platforms than Windows, and both have setupTerminalState()
and cleanupTerminalState()
functions (or whatever name best fits) which get called only for Smallstep's CLI.
Caddy uses cli-utils
indirectly through these dependencies:
$ go mod why go.step.sm/cli-utils/ui
# go.step.sm/cli-utils/ui
github.com/caddyserver/caddy/v2/modules/caddypki
github.com/smallstep/certificates/authority
github.com/smallstep/certificates/kms
github.com/smallstep/certificates/kms/softkms
go.step.sm/cli-utils/ui
Credit to https://github.com/egonelbre for spotting the cause of the issue, and https://github.com/Mohammed90 for exploring a workaround.
I wonder if there is any particular reason to build with github.com/samfoo/ansi, which is a (less maintained) fork of github.com/mgutz/ansi?
I noticed recentrly when packaging this library for debian, which already has github.com/mgutz/ansi in its archives. I added a patch for cli-utils to use that instead which builds/works fine.
Could do PR if you agree
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.