computeLockData computes data about the given repository and working directory to use in lockPath.
()
| 80 | // computeLockData computes data about the given repository and working |
| 81 | // directory to use in lockPath. |
| 82 | func computeLockData() (*lockData, error) { |
| 83 | wd, err := tools.Getwd() |
| 84 | if err != nil { |
| 85 | return nil, err |
| 86 | } |
| 87 | wd, err = tools.CanonicalizeSystemPath(wd) |
| 88 | if err != nil { |
| 89 | return nil, err |
| 90 | } |
| 91 | return &lockData{ |
| 92 | rootDir: cfg.LocalWorkingDir(), |
| 93 | workingDir: wd, |
| 94 | }, nil |
| 95 | } |
| 96 | |
| 97 | // lockPath relativizes the given filepath such that it is relative to the root |
| 98 | // path of the repository it is contained within, taking into account the |
no test coverage detected