diff --git a/commands/command_lock.go b/commands/command_lock.go index 0a7141e7..553d7ce9 100644 --- a/commands/command_lock.go +++ b/commands/command_lock.go @@ -72,7 +72,7 @@ func lockPath(file string) (string, error) { abs := filepath.Join(wd, file) path := strings.TrimPrefix(abs, repo) - path = strings.TrimPrefix(path, "/") + path = strings.TrimPrefix(path, os.PathSeparator) if stat, err := os.Stat(abs); err != nil { return path, err } else {