Skip to content

Add a transform/validator that checks for files on a default path.#698

Merged
phlptp merged 7 commits intoCLIUtils:mainfrom
phlptp:FileOnDefaultPathTransform
Jan 31, 2022
Merged

Add a transform/validator that checks for files on a default path.#698
phlptp merged 7 commits intoCLIUtils:mainfrom
phlptp:FileOnDefaultPathTransform

Conversation

@phlptp
Copy link
Copy Markdown
Collaborator

@phlptp phlptp commented Jan 28, 2022

This is an alternative to #684 and closes #682. It add a transform/validator that checks for a file and on a default path.
This if used with a config ptr can be used to add a default path, or any number of default paths for that matter.

I think it has the same capabilities as #684 without adding any additional API calls and adding a new validator which may have other uses as well.

@phlptp phlptp requested a review from henryiii January 28, 2022 20:25
@phlptp
Copy link
Copy Markdown
Collaborator Author

phlptp commented Jan 28, 2022

This will need a couple more test cases and some docs before merging but wanted to see what @henryiii and Firefly35 thought of this alternative.

@henryiii
Copy link
Copy Markdown
Collaborator

This looks good, works within the existing infrastructure, and can be expanded to look in several locations (like ~/.config and ./.config, etc). I think a bit of docs showing how to use it would be useful.

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
@phlptp phlptp force-pushed the FileOnDefaultPathTransform branch from 7d5eaa8 to afc19b8 Compare January 31, 2022 16:33
@phlptp phlptp merged commit 2565594 into CLIUtils:main Jan 31, 2022
@phlptp phlptp deleted the FileOnDefaultPathTransform branch January 31, 2022 23:07
@github-actions github-actions bot added the needs changelog Hasn't been added to the changelog yet label Jan 31, 2022
@sg-james
Copy link
Copy Markdown

sg-james commented Feb 9, 2022

Apologies for bumping, but I believe this PR might have accidentally closed issue #694 by accident and meant to close issue #682.

@henryiii
Copy link
Copy Markdown
Collaborator

henryiii commented Feb 9, 2022

Corrected, thanks!

@henryiii henryiii removed the needs changelog Hasn't been added to the changelog yet label Mar 27, 2022
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.

Allow to set a config root folder with set_config

3 participants