-
Notifications
You must be signed in to change notification settings - Fork 53
feat: Automatically create HELM_GIT_*_CACHE folders #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
HELM_GIT_*_CACHE folders|
@copilot do not handle tilde manually. |
Removed manual tilde expansion handling as requested. The implementation now focuses purely on automatic cache directory creation without manual path manipulation. Commit: 226eee0 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Completed both tasks:
All tests continue to pass. Commit: 6802457 |
6802457 to
1a9ca08
Compare
|
@copilot Add a mention to the readme would be nice. |
- Auto-create HELM_GIT_REPO_CACHE directory if it doesn't exist - Auto-create HELM_GIT_CHART_CACHE directory if it doesn't exist - Handle tilde (~) expansion to home directory properly - Add comprehensive tests for new functionality - All existing cache tests continue to pass
- Use inline error handling instead of calling error function - Ensure proper error messages when directory creation fails - Error function not available during early script sourcing phase
Co-authored-by: aslafy-z <[email protected]>
Co-authored-by: aslafy-z <[email protected]>
Co-authored-by: aslafy-z <[email protected]>
134804f to
fa8dc05
Compare
This PR implements automatic creation of cache directories specified by
HELM_GIT_REPO_CACHEandHELM_GIT_CHART_CACHEenvironment variables, addressing the issue where users encounter errors when these directories don't exist.Problem
When users set cache environment variables to non-existent directories, the plugin fails with errors like:
This occurs because the plugin checks for directory existence but doesn't create them automatically.
Solution
The fix adds automatic directory creation during cache enablement with the following features:
mkdir -pto create cache directories and parent pathsExample Usage
The following command now works out of the box:
Testing
Added comprehensive test coverage in
06-helm-git-cache.batsincluding:All existing tests continue to pass, ensuring no regressions.
Documentation
The README now documents that cache directories are automatically created when specified, providing users with clear expectations about the caching functionality.
Fixes #303.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.