Skip to content

Conversation

@ciaranjohnston
Copy link
Member

When users explicitly pass '.' as the destination directory, kpt pkg get now places files directly in the current directory, matching the behavior of 'git clone' and 'kpt cfg set'.

Changes:

  • Modified parse.GitParseArgs() to track if destination was explicitly provided
  • Updated getDest() to use current directory directly when explicitly specified
  • Modified get.Run() to allow using existing empty directories
  • Preserved default behavior: when no destination is provided, still creates a subdirectory with the package name

Fixes #1407

…fied

When users explicitly pass '.' as the destination directory, kpt pkg get
now places files directly in the current directory, matching the behavior
of 'git clone' and 'kpt cfg set'.

Changes:
- Modified parse.GitParseArgs() to track if destination was explicitly provided
- Updated getDest() to use current directory directly when explicitly specified
- Modified get.Run() to allow using existing empty directories
- Preserved default behavior: when no destination is provided, still creates
  a subdirectory with the package name

Fixes #1407
@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for kptdocs ready!

Name Link
🔨 Latest commit b8ecd88
🔍 Latest deploy log https://app.netlify.com/projects/kptdocs/deploys/69306d6129a35b000861fa23
😎 Deploy Preview https://deploy-preview-4334--kptdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: kpt pkg get has inconsistent behavior when LOCAL_DEST_DIRECTORY is the current directory

2 participants