Skip to content

Commit

Permalink
incus/project: Fix get-current for default (unset) project
Browse files Browse the repository at this point in the history
Closes #1474
  • Loading branch information
irhndt authored and stgraber committed Dec 10, 2024
1 parent 7898c73 commit 9382e0d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/incus/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,10 @@ func (c *cmdProjectGetCurrent) Run(cmd *cobra.Command, args []string) error {
if !ok {
return fmt.Errorf(i18n.G("Remote %s doesn't exist"), conf.DefaultRemote)
}

fmt.Println(remote.Project)
if remote.Project == "" {
fmt.Println(api.ProjectDefaultName)
} else {
fmt.Println(remote.Project)
}
return nil
}

0 comments on commit 9382e0d

Please sign in to comment.