Skip to content

Commit 8b4b3a5

Browse files
committed
fix: ProfileCreate sets the new profile as default only if asked to do so
1 parent 1909ab7 commit 8b4b3a5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

commands/service_profile_init.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ func (s *arduinoCoreServerImpl) ProfileCreate(ctx context.Context, req *rpc.Prof
9090
})
9191

9292
sk.Project.Profiles = append(sk.Project.Profiles, newProfile)
93-
// Set the profile as the default one if it's the only one
94-
if req.DefaultProfile || len(sk.Project.Profiles) == 1 {
93+
if req.DefaultProfile {
9594
sk.Project.DefaultProfile = newProfile.Name
9695
}
9796

0 commit comments

Comments
 (0)