fix: attempt to fix cmd tests

This commit is contained in:
Slug-Boi
2025-06-03 20:12:15 +02:00
parent f4cb12741f
commit 84de8e1e4e
2 changed files with 5 additions and 4 deletions
+4 -1
View File
@@ -12,7 +12,7 @@ import (
"github.com/spf13/cobra"
)
var authorfile = utils.Find_authorfile()
var authorfile string
// usersCmd represents the users command
func UsersCmd() *cobra.Command {
@@ -21,6 +21,9 @@ func UsersCmd() *cobra.Command {
Short: "Displays all users from the author file located at:\n" + authorfile,
Long: `Displays all users from the author file located at:` + "\n" + authorfile,
Run: func(cmd *cobra.Command, args []string) {
if authorfile == "" {
authorfile = utils.Find_authorfile()
}
if update {
update_msg()
}