Some test fixes for the cobra integration

This commit is contained in:
David Dworken
2022-11-14 20:55:10 -08:00
parent be2cde72c2
commit fe6394d1b5
7 changed files with 59 additions and 66 deletions

View File

@@ -652,7 +652,7 @@ func readFileToArray(path string) ([]string, error) {
return lines, nil
}
func Install() error {
func Install(offline bool) error {
homedir, err := os.UserHomeDir()
if err != nil {
return fmt.Errorf("failed to get user's home directory: %v", err)
@@ -683,8 +683,8 @@ func Install() error {
}
_, err = hctx.GetConfig()
if err != nil {
// No config, so set up a new installation with a new key and in online mode
return Setup("", false)
// No config, so set up a new installation with a new key
return Setup("", offline)
}
return nil
}