lockfilePath returns the absolute path to the lock file.
()
| 41 | |
| 42 | // lockfilePath returns the absolute path to the lock file. |
| 43 | func lockfilePath() (string, error) { |
| 44 | home, err := os.UserHomeDir() |
| 45 | if err != nil { |
| 46 | return "", err |
| 47 | } |
| 48 | return filepath.Join(home, agentsDir, lockFile), nil |
| 49 | } |
| 50 | |
| 51 | // readFrom loads the lock file from an open file handle. |
| 52 | // Returns an empty file if the content is empty, corrupt, or incompatible. |