Skip to content

Commit 76a1298

Browse files
committed
Handling Unix case
1 parent 293514c commit 76a1298

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/profiles.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ func (p *Profiles) Save() error {
175175

176176
profilesFile := filepath.Join(viper.GetString("local-dir"), viper.GetString("profiles-file"))
177177
re := regexp.MustCompile(`(Users\\).*(\\)`)
178-
slog.Info("saving profiles", slog.String("path", re.ReplaceAllString(profilesFile, `Users\*****\`)))
178+
interimString := re.ReplaceAllString(profilesFile, `Users\*****\`)
179+
re := regexp.MustCompile(`(home/).*(/)`)
180+
slog.Info("saving profiles", slog.String("path", re.ReplaceAllString(profilesFile, `home/*****/`)))
179181

180182
profilesJSON, err := json.MarshalIndent(p, "", " ")
181183
if err != nil {

0 commit comments

Comments
 (0)