diff --git a/internal/webui/public/package-lock.json b/internal/webui/public/package-lock.json index 1d7c3cf5..6852df28 100644 --- a/internal/webui/public/package-lock.json +++ b/internal/webui/public/package-lock.json @@ -79,9 +79,9 @@ } }, "node_modules/@fortawesome/fontawesome-free": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.1.tgz", - "integrity": "sha512-CNy5vSwN3fsUStPRLX7fUYojyuzoEMSXPl7zSLJ8TgtRfjv24LOnOWKT2zYwaHZCJGkdyRnTmstR0P+Ah503Gw==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.2.tgz", + "integrity": "sha512-hRILoInAx8GNT5IMkrtIt9blOdrqHOnPBH+k70aWUAqPZPgopb9G5EQJFpaBx/S8zp2fC+mPW349Bziuk1o28Q==", "hasInstallScript": true, "engines": { "node": ">=6" @@ -151,9 +151,9 @@ } }, "node_modules/alpinejs": { - "version": "3.13.7", - "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.7.tgz", - "integrity": "sha512-rcTyjTANbsePq1hb7eSekt3qjI94HLGeO6JaRjCssCVbIIc+qBrc7pO5S/+2JB6oojIibjM6FA+xRI3zhGPZIg==", + "version": "3.13.8", + "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.8.tgz", + "integrity": "sha512-XolbBJryCndomtaHd/KHQjQeD/L72FJxy/YhLLFD4Lr7zzGcpcbg+UgXteMR2pYg1KhRUr6V4O3GfN1zJAmRWw==", "dependencies": { "@vue/reactivity": "~3.1.1" } @@ -2122,9 +2122,9 @@ } }, "@fortawesome/fontawesome-free": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.1.tgz", - "integrity": "sha512-CNy5vSwN3fsUStPRLX7fUYojyuzoEMSXPl7zSLJ8TgtRfjv24LOnOWKT2zYwaHZCJGkdyRnTmstR0P+Ah503Gw==" + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.2.tgz", + "integrity": "sha512-hRILoInAx8GNT5IMkrtIt9blOdrqHOnPBH+k70aWUAqPZPgopb9G5EQJFpaBx/S8zp2fC+mPW349Bziuk1o28Q==" }, "@popperjs/core": { "version": "2.11.8", @@ -2183,9 +2183,9 @@ } }, "alpinejs": { - "version": "3.13.7", - "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.7.tgz", - "integrity": "sha512-rcTyjTANbsePq1hb7eSekt3qjI94HLGeO6JaRjCssCVbIIc+qBrc7pO5S/+2JB6oojIibjM6FA+xRI3zhGPZIg==", + "version": "3.13.8", + "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.8.tgz", + "integrity": "sha512-XolbBJryCndomtaHd/KHQjQeD/L72FJxy/YhLLFD4Lr7zzGcpcbg+UgXteMR2pYg1KhRUr6V4O3GfN1zJAmRWw==", "requires": { "@vue/reactivity": "~3.1.1" } diff --git a/main.go b/main.go index 734ad923..6744c193 100644 --- a/main.go +++ b/main.go @@ -801,9 +801,25 @@ The kairos agent is a component to abstract away node ops, providing a common fe UsageText: ``, Copyright: "kairos authors", Before: func(c *cli.Context) error { - // Set debug from here already, so it's loaded by the ReadConfigRun - viper.Set("debug", c.Bool("debug")) + var debug bool + // Get debug from env or cmdline + cmdline, _ := os.ReadFile("/proc/cmdline") + if strings.Contains(string(cmdline), "rd.kairos.debug") { + debug = true + } + + if os.Getenv("KAIROS_AGENT_DEBUG") == "true" { + debug = true + } + if c.Bool("debug") { + debug = true + } + + // Set debug from here already, so it's loaded by the Config unmarshall + viper.Set("debug", debug) + if debug { + // Dont hide private fields, we want the full object biew litter.Config.HidePrivateFields = false // Hide logger and client fields from litter as otherwise the config dumps are huge and a bit useless litter.Config.FieldExclusions = regexp.MustCompile(`Logger|logger|Client`)