mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
fix: attempt to fix cmd tests
This commit is contained in:
+1
-3
@@ -6,8 +6,6 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/Slug-Boi/cocommit/src/cmd/utils"
|
||||
)
|
||||
|
||||
const author_data = `
|
||||
@@ -34,7 +32,7 @@ const author_data = `
|
||||
}
|
||||
}`
|
||||
|
||||
var envVar = utils.Find_authorfile()
|
||||
var envVar string
|
||||
|
||||
func setup() {
|
||||
// setup test data
|
||||
|
||||
+4
-1
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user