Skip to content
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

Enhanced Path Resolution for gcpCredentialsPath and ageKeyFile in getSopsGeneralOptions #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

M1kep
Copy link

@M1kep M1kep commented Dec 19, 2023

Summary

This pull request updates the getSopsGeneralOptions function to improve how paths are handled, specifically for gcpCredentialsPath and ageKeyFile. The key enhancement is the ability to interpret and resolve paths starting with ~, translating them to the user's home directory.

Changes

Home Directory Path Expansion: The function now recognizes paths beginning with ~ for both gcpCredentialsPath and ageKeyFile. It expands these paths to the user's home directory, enabling a more intuitive way for users to specify file locations.

Path Normalization: The code uses path.join for joining the home directory path with the rest of the path, ensuring correct formatting and resolution across different operating systems.

Impact

This update simplifies path specification for users, allowing them to use the familiar ~ shorthand for the home directory.
It enhances the robustness of the function in handling different types of path inputs, improving the overall reliability of the extension.

Enhance the getSopsGeneralOptions function to properly handle file paths starting with '~' in both ageKeyFile and gcpCredentialsPath. This update allows these paths to be resolved to the user's home directory, improving usability and flexibility in path specification within sopsrc.
@M1kep M1kep force-pushed the fix/home-dir-tilde branch from 4046d61 to 42c6650 Compare December 19, 2023 06:11
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.

1 participant