mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-14 02:32:39 -06:00
internal/providercache: staticcheck
This commit is contained in:
parent
313d3e5c4d
commit
6529659455
@ -12,7 +12,6 @@ import (
|
|||||||
|
|
||||||
"github.com/hashicorp/terraform/httpclient"
|
"github.com/hashicorp/terraform/httpclient"
|
||||||
"github.com/hashicorp/terraform/internal/copy"
|
"github.com/hashicorp/terraform/internal/copy"
|
||||||
copydir "github.com/hashicorp/terraform/internal/copy"
|
|
||||||
"github.com/hashicorp/terraform/internal/getproviders"
|
"github.com/hashicorp/terraform/internal/getproviders"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -154,7 +153,7 @@ func installFromLocalDir(ctx context.Context, meta getproviders.PackageMeta, tar
|
|||||||
// these two paths are not pointing at the same physical directory on
|
// these two paths are not pointing at the same physical directory on
|
||||||
// disk. This compares the files by their OS-level device and directory
|
// disk. This compares the files by their OS-level device and directory
|
||||||
// entry identifiers, not by their virtual filesystem paths.
|
// entry identifiers, not by their virtual filesystem paths.
|
||||||
if same, err := copydir.SameFile(absNew, absCurrent); same {
|
if same, err := copy.SameFile(absNew, absCurrent); same {
|
||||||
return nil, fmt.Errorf("cannot install existing provider directory %s to itself", targetDir)
|
return nil, fmt.Errorf("cannot install existing provider directory %s to itself", targetDir)
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return nil, fmt.Errorf("failed to determine if %s and %s are the same: %s", sourceDir, targetDir, err)
|
return nil, fmt.Errorf("failed to determine if %s and %s are the same: %s", sourceDir, targetDir, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user