Skip to content

Commit

Permalink
windows: Explain when fixUserPartOfCrcUsersAndHypervAdminsGroup is ne…
Browse files Browse the repository at this point in the history
…eded

It's only needed when crc is installed through chocolatey. Add an
explicit comment for this since it's not obvious why it's needed if you
only have the MSI in mind.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
  • Loading branch information
cfergeau authored and anjannath committed Mar 26, 2024
1 parent ce11282 commit 75862f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/crc/preflight/preflight_windows.go
Expand Up @@ -150,8 +150,8 @@ var adminHelperServiceCheks = []Check{
},
}

// 'crc-user' group is supposed to be created by the msi or chocolatey
// this check makes sure that was done before stating crc, it does not
// The 'crc-users' group is supposed to be created by the msi or chocolatey
// this check makes sure that was done before starting crc, it does not
// have a fix function since this'll be handled by the msi or choco
var crcUsersGroupExistsCheck = Check{
configKeySuffix: "check-crc-users-group-exists",
Expand All @@ -168,6 +168,10 @@ var crcUsersGroupExistsCheck = Check{
labels: labels{Os: Windows},
}

// When installed through chocolatey, `fixUserPartOfCrcUsersAndHypervAdminsGroup`
// is needed as chocolatey is not doing this step.
//
// When installed with the MSI, the user should already be part of the required groups.
var userPartOfCrcUsersAndHypervAdminsGroupCheck = Check{
configKeySuffix: "check-user-in-crc-users-and-hyperv-admins-group",
checkDescription: "Checking if current user is in crc-users and Hyper-V admins group",
Expand Down

0 comments on commit 75862f4

Please sign in to comment.