Visual improvements

pull/184/head
Simon Let 3 years ago
parent e3d8d9f05a
commit df45f3869d
  1. 6
      cmd/control/cmd/doctor.go
  2. 10
      internal/check/check.go

@ -41,12 +41,10 @@ func printDivider() {
} }
var msgFailedDaemonStart = `Failed to start RESH daemon. var msgFailedDaemonStart = `Failed to start RESH daemon.
-> Start RESH daemon manually - run: resh-daemon-start -> Start RESH daemon manually - run: resh-daemon-start
-> Or restart this terminal window to bring RESH daemon back up -> Or restart this terminal window to bring RESH daemon back up
-> You can check logs: ~/.local/share/resh/log.json (or ~/$XDG_DATA_HOME/resh/log.json) -> You can check logs: ~/.local/share/resh/log.json (or ~/$XDG_DATA_HOME/resh/log.json)
-> You can create an issue at: https://github.com/curusarn/resh/issues -> You can create an issue at: https://github.com/curusarn/resh/issues
` `
func checkDaemon(config cfg.Config) bool { func checkDaemon(config cfg.Config) bool {
@ -93,12 +91,10 @@ func startDaemon(port int, maxRetries int, backoff time.Duration) (*msg.StatusRe
return resp, nil return resp, nil
} }
var msgShellFilesNotLoaded = `RESH shell files were not properly loaded in this terminal. var msgShellFilesNotLoaded = `RESH shell files were not properly loaded in this terminal
-> Try restarting this terminal to see if the issue persists -> Try restarting this terminal to see if the issue persists
-> Check your shell rc files (e.g. .zshrc, .bashrc, ...) -> Check your shell rc files (e.g. .zshrc, .bashrc, ...)
-> You can create an issue at: https://github.com/curusarn/resh/issues -> You can create an issue at: https://github.com/curusarn/resh/issues
` `
func checkShellSession() bool { func checkShellSession() bool {

@ -22,10 +22,12 @@ func LoginShell() (string, error) {
} }
func msgShellVersion(shell, expectedVer, actualVer string) string { func msgShellVersion(shell, expectedVer, actualVer string) string {
return fmt.Sprintf(`Minimal supported %s version is %s. You have %s. return fmt.Sprintf(
"Minimal supported %s version is %s. You have %s.\n"+
-> Update your %s if you want to use RESH with it. " -> Update to %s %s+ if you want to use RESH with it",
`, shell, expectedVer, actualVer, shell) shell, expectedVer, actualVer,
shell, expectedVer,
)
} }
func BashVersion() (string, error) { func BashVersion() (string, error) {

Loading…
Cancel
Save