mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 18:29:53 +00:00
chore: Update CLI prompt to run command as root (#1517)
This commit is contained in:
@@ -113,9 +113,8 @@ func runTroubleshoot(v *viper.Viper, args []string) error {
|
||||
|
||||
if interactive {
|
||||
if len(mainBundle.Spec.HostCollectors) > 0 && !util.IsRunningAsRoot() {
|
||||
msg := "Some host collectors may require elevated privileges to run.\nDo you want to exit and rerun the command as a privileged user?"
|
||||
fmt.Print(cursor.Show())
|
||||
if util.PromptYesNo(msg) {
|
||||
if util.PromptYesNo(util.HOST_COLLECTORS_RUN_AS_ROOT_PROMPT) {
|
||||
fmt.Println("Exiting...")
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user