Skip to content

Commit e81fbea

Browse files
authored
fix(cli): lock file path incorrect (#40)
Signed-off-by: Kevin Cui <[email protected]>
1 parent 79b8a9c commit e81fbea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/cli/setup.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ func (c *Context) basic() error {
9191

9292
// Avoid folder names being taken by files
9393
// 1118 is my wife's birthday :)
94-
if err := os.MkdirAll("/tmp/oomol-lab.ovm.lock.1118", 0755); err != nil {
94+
lockPrefixPath := "/tmp/oomol-lab.ovm.lock.1118"
95+
96+
if err := os.MkdirAll(lockPrefixPath, 0755); err != nil {
9597
return err
9698
}
9799

@@ -107,7 +109,7 @@ func (c *Context) basic() error {
107109

108110
sum := md5.Sum([]byte(c.ExecutablePath))
109111
hash := hex.EncodeToString(sum[:])
110-
c.LockFile = "/tmp/ovm/" + hash + "-" + name + ".pid"
112+
c.LockFile = lockPrefixPath + "/" + hash + "-" + name + ".pid"
111113
}
112114

113115
return nil

0 commit comments

Comments
 (0)