totp icon indicating copy to clipboard operation
totp copied to clipboard

Can't get the config add --stdio option to work

Open richardkhardy opened this issue 3 months ago • 0 comments

totp config add --stdio name value always uses the $HOME/.totp-config.json file for me. I needed to change in root.go

if cmd.Flags().Lookup(optionStdio) != nil {
         if cfg.useStdio {

to

if cmd.Flags().Lookup(optionStdio) != nil {
	if  cmd.Flags().Changed(optionStdio)  {
```				
to get it to work. cfg.useStdio is always false. It looks like configupdate.go / getConfigUpdateCmd() is where the problem lies.

richardkhardy avatar Mar 18 '24 23:03 richardkhardy