Skip to content

Commit

Permalink
fix: handle completion info check error (fixes #329)
Browse files Browse the repository at this point in the history
  • Loading branch information
CelestialCrafter committed Nov 22, 2024
1 parent ac7c974 commit 642dc6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 🎀 Changelog

## Unreleased
### Fixed
- Handle an error in completions

## [2.3.3] - 2024-11-04
### Fixed
- Heredocs having issues
Expand Down
6 changes: 5 additions & 1 deletion complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ func matchPath(query string) ([]string, string) {
for _, entry := range files {
// should we handle errors here?
file, err := entry.Info()
if err == nil && file.Mode() & os.ModeSymlink != 0 {
if err != nil {
continue
}

if file.Mode() & os.ModeSymlink != 0 {
path, err := filepath.EvalSymlinks(filepath.Join(path, file.Name()))
if err == nil {
file, err = os.Lstat(path)
Expand Down

0 comments on commit 642dc6c

Please sign in to comment.