Skip to content

Commit 9f98870

Browse files
Skip symlink resolution when directory == .
Signed-off-by: Ciaran Johnston <ciaran.johnston@ericsson.com>
1 parent 15c07b1 commit 9f98870

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

commands/pkg/get/cmdget.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package get
1717
import (
1818
"context"
1919
"os"
20+
"path/filepath"
2021
"strings"
2122

2223
docs "github.com/kptdev/kpt/internal/docs/generated/pkgdocs"
@@ -80,7 +81,7 @@ func (r *Runner) preRunE(_ *cobra.Command, args []string) error {
8081
explicitDest := len(args) > 1
8182
if len(args) == 1 {
8283
args = append(args, pkg.CurDir)
83-
} else {
84+
} else if filepath.Clean(args[1]) != "." {
8485
_, err := os.Lstat(args[1])
8586
if err == nil || os.IsExist(err) {
8687
resolvedPath, err := argutil.ResolveSymlink(r.ctx, args[1])

0 commit comments

Comments
 (0)