fix: lock-mgr lock identifier if file does not exist
This commit is contained in:
@@ -340,6 +340,9 @@ func run() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("cannot resolve file path: %w", err)
|
return fmt.Errorf("cannot resolve file path: %w", err)
|
||||||
}
|
}
|
||||||
|
if _, statErr := os.Stat(filePath); os.IsNotExist(statErr) {
|
||||||
|
filePath = fileArg
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure lock file exists
|
// Ensure lock file exists
|
||||||
if _, statErr := os.Stat(mgrPath); os.IsNotExist(statErr) {
|
if _, statErr := os.Stat(mgrPath); os.IsNotExist(statErr) {
|
||||||
|
|||||||
Reference in New Issue
Block a user