We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3d606a commit 16b393dCopy full SHA for 16b393d
pkg/usrlocalsharelima/usrlocalsharelima.go
@@ -13,14 +13,15 @@ import (
13
14
"github.com/lima-vm/lima/pkg/debugutil"
15
"github.com/lima-vm/lima/pkg/limayaml"
16
+ . "github.com/lima-vm/lima/pkg/must"
17
"github.com/sirupsen/logrus"
18
)
19
20
+// executable is a variable that can be overridden in tests.
21
+var executable = os.Executable
22
+
23
func Dir() (string, error) {
- self, err := os.Executable()
- if err != nil {
- return "", err
- }
24
+ self := Must(executable())
25
selfSt, err := os.Stat(self)
26
if err != nil {
27
return "", err
0 commit comments