Skip to content

Commit

Permalink
fix(alfred): buildPath ModeSymlink path mapping fail
Browse files Browse the repository at this point in the history
  • Loading branch information
cage1016 committed Oct 22, 2023
1 parent d850d60 commit 470ee11
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions alfred/alfred.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,11 @@ func (a *Alfred) GetExistingLink() (string, error) {
return "", err
}

wd, _ := os.Getwd()
buildPath := path.Join(wd, a.BuildDir)

for _, dir := range dirs {
if dir.Mode()&os.ModeSymlink == os.ModeSymlink {
fullDir := path.Join(a.WorkflowsPath, dir.Name())
link, err := filepath.EvalSymlinks(fullDir)
if err == nil && link == buildPath {
if err == nil && link == a.BuildDir {
return fullDir, nil
}
}
Expand Down

0 comments on commit 470ee11

Please sign in to comment.