File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,25 @@ package main
3
3
import (
4
4
"errors"
5
5
"fmt"
6
+ "os"
7
+ "path/filepath"
6
8
"runtime"
7
9
8
10
"github.com/lima-vm/lima/pkg/networks"
9
11
"github.com/spf13/cobra"
10
12
)
11
13
12
14
func newSudoersCommand () * cobra.Command {
15
+ networksMD := "$PREFIX/share/doc/lima/docs/network.md"
16
+ if exe , err := os .Executable (); err == nil {
17
+ binDir := filepath .Dir (exe )
18
+ prefixDir := filepath .Dir (binDir )
19
+ networksMD = filepath .Join (prefixDir , "share/doc/lima/docs/network.md" )
20
+ }
13
21
sudoersCommand := & cobra.Command {
14
22
Use : "sudoers [SUDOERSFILE]" ,
15
- Short : "Generate /etc/sudoers.d/lima file." ,
23
+ Short : "Generate /etc/sudoers.d/lima file for enabling vmnet.framework support" ,
24
+ Long : fmt .Sprintf ("Generate /etc/sudoers.d/lima file for enabling vmnet.framework support.\n See %s for the usage." , networksMD ),
16
25
Args : cobra .MaximumNArgs (1 ),
17
26
RunE : sudoersAction ,
18
27
}
@@ -67,4 +76,4 @@ func verifySudoAccess(args []string) error {
67
76
}
68
77
fmt .Printf ("%q is up-to-date (or sudo doesn't require a password)\n " , file )
69
78
return nil
70
- }
79
+ }
Original file line number Diff line number Diff line change
1
+ # Example to enable vmnet.framework
2
+ # This example requires Lima v0.7.0 or later.
3
+ # Older versions of Lima were using a different syntax for supporting vmnet.framework.
1
4
images :
2
5
# Hint: run `limactl prune` to invalidate the "current" cache
3
6
- location : " https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-amd64.img"
You can’t perform that action at this time.
0 commit comments