mirror of
https://github.com/anchore/syft.git
synced 2026-10-31 22:46:36 +01:00
rename file.Location.VirtualPath to AccessPath (#2288)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -64,7 +64,7 @@ func parsePackageJSON(_ file.Resolver, _ *generic.Environment, reader file.Locat
|
||||
}
|
||||
|
||||
if !p.hasNameAndVersionValues() {
|
||||
log.Debugf("encountered package.json file without a name and/or version field, ignoring (path=%q)", reader.AccessPath())
|
||||
log.Debugf("encountered package.json file without a name and/or version field, ignoring (path=%q)", reader.Path())
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ type packageLockLicense []string
|
||||
func parsePackageLock(resolver file.Resolver, _ *generic.Environment, reader file.LocationReadCloser) ([]pkg.Package, []artifact.Relationship, error) {
|
||||
// in the case we find package-lock.json files in the node_modules directories, skip those
|
||||
// as the whole purpose of the lock file is for the specific dependencies of the root project
|
||||
if pathContainsNodeModulesDirectory(reader.AccessPath()) {
|
||||
if pathContainsNodeModulesDirectory(reader.Path()) {
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ const (
|
||||
func parseYarnLock(resolver file.Resolver, _ *generic.Environment, reader file.LocationReadCloser) ([]pkg.Package, []artifact.Relationship, error) {
|
||||
// in the case we find yarn.lock files in the node_modules directories, skip those
|
||||
// as the whole purpose of the lock file is for the specific dependencies of the project
|
||||
if pathContainsNodeModulesDirectory(reader.AccessPath()) {
|
||||
if pathContainsNodeModulesDirectory(reader.Path()) {
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user