mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix incorrect missing gitdir file detection
This commit is contained in:
parent
530c9ec6ec
commit
911105f27c
1 changed files with 2 additions and 1 deletions
|
@ -1729,11 +1729,12 @@ def list_worktrees(cwd, stale=False, user=None, **kwargs):
|
|||
worktree_info[worktree_name] = worktree_loc
|
||||
break
|
||||
except (IOError, OSError) as exc:
|
||||
if exc.errno == errno.EEXIST:
|
||||
if exc.errno == errno.ENOENT:
|
||||
log.warning(
|
||||
gitdir_file + ' does not exist, data for worktree ' +
|
||||
worktree_name + ' may be corrupted. Try pruning worktrees.'
|
||||
)
|
||||
continue
|
||||
elif exc.errno == errno.EACCES:
|
||||
raise CommandExecutionError(
|
||||
'Permission denied reading from ' + gitdir_file
|
||||
|
|
Loading…
Add table
Reference in a new issue