Skip to content

Commit 546a92a

Browse files
committed
Update cmd current
1 parent fb27f7a commit 546a92a

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ Show the currently selected profile for the current repository:
121121
git-profile current
122122
```
123123

124-
If no profile has been applied yet, the command prints `default`.
125-
126124
### `export`
127125

128126
Export a profile as JSON:

cmd/current.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ func Current(cfg storage, v vcs) *cobra.Command {
2626

2727
res, err := v.Get(currentProfileKey)
2828
if len(res) == 0 || err != nil {
29-
cmd.Printf("%s\n", defaultProfileName)
29+
cmd.Printf("Current profile is: %s\n", defaultProfileName)
3030
os.Exit(0)
3131
}
3232

33-
cmd.Printf("%s\n", res)
33+
cmd.Printf("Current profile is: %s\n", res)
3434
},
3535
}
3636
}

cmd/current_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ func TestCurrent(t *testing.T) {
3434
err := cmd.Execute()
3535

3636
is.NoErr(err)
37-
is.Equal(strings.TrimSpace(b.String()), "home")
37+
is.Equal(strings.TrimSpace(b.String()), "Current profile is: home")
3838
}

0 commit comments

Comments
 (0)