Skip to content

Commit

Permalink
Merge pull request #76 from paketo-buildpacks/switch_module
Browse files Browse the repository at this point in the history
Switch from using io/fs to just using os which preserves Go 1.15 compatibility
  • Loading branch information
Daniel Mikusa authored Aug 20, 2021
2 parents 3f5b5f4 + 6c1483e commit 7b3bdb0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sherpa/file_listing.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"encoding/hex"
"fmt"
"io"
"io/fs"
"os"
"path/filepath"
"sort"
Expand Down Expand Up @@ -162,8 +161,8 @@ func process(entry FileEntry) (FileEntry, error) {
return entry, nil
}

func isSymlinkToDir(symlink string, f fs.FileInfo) (bool, error) {
if f.Mode().Type() == fs.ModeSymlink {
func isSymlinkToDir(symlink string, f os.FileInfo) (bool, error) {
if f.Mode().Type() == os.ModeSymlink {
path, err := os.Readlink(symlink)
if err != nil {
return false, fmt.Errorf("unable to read symlink %s\n%w", symlink, err)
Expand Down

0 comments on commit 7b3bdb0

Please sign in to comment.