M7: add verbose mode for debugging
Add -v/--verbose persistent flag that prints debug info to stderr: D-Bus connection status, token plugin directory discovery, unlock method sequencing with per-method success/failure, and full cryptsetup command lines including LD_LIBRARY_PATH. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"git.wntrmute.dev/kyle/arca/internal/verbose"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -12,6 +13,10 @@ var rootCmd = &cobra.Command{
|
||||
Short: "Mount and unmount LUKS-encrypted volumes",
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.PersistentFlags().BoolVarP(&verbose.Enabled, "verbose", "v", false, "print debug information to stderr")
|
||||
}
|
||||
|
||||
func SetVersion(v string) {
|
||||
rootCmd.Version = v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user