Skip to content

Templates & Features Packaging - Throw warning of a missing JSON file and continue - #206

Merged
Samruddhi Khandale (samruddhikhandale) merged 7 commits into
mainfrom
samruddhikhandale/modify-templates-publish
Oct 7, 2022
Merged

Samruddhi Khandale (samruddhikhandale) merged 7 commits into
mainfrom
samruddhikhandale/modify-templates-publish

Conversation

@samruddhikhandale

@samruddhikhandale Samruddhi Khandale (samruddhikhandale) commented Oct 6, 2022 •

Copy link
Copy Markdown
Member

When packaging a collection of templates with templates publish or feature publish cmd , it errors out when a sub-folder does not contain files meant for templates publishing (eg. devcontainer-*.json).

This PR warns about empty directories, but still continue. That would make the user aware of a missing JSON file, but still support the case where this is expected.

@joshspicer

Copy link
Copy Markdown
Contributor

I feel like we shouldn't need a flag for this, but rather just (1) not allow empty directories or (2) always allow empty directories and automatically ignore.

Perhaps there is an example you have where this indeed the best way to do it?

@chrmarti

Copy link
Copy Markdown
Contributor

I feel like we shouldn't need a flag for this, but rather just (1) not allow empty directories or (2) always allow empty directories and automatically ignore.

Perhaps there is an example you have where this indeed the best way to do it?

Or: Warn about empty directories, but still continue. That would make the user aware of a missing JSON file, but still support the case where this is expected.

@samruddhikhandale

Copy link
Copy Markdown
Member Author

Or: Warn about empty directories, but still continue. That would make the user aware of a missing JSON file, but still support the case where this is expected.

This makes sense. I'll update the PR.

@samruddhikhandale Samruddhi Khandale (samruddhikhandale) changed the title templates publish cmd - adds --allow-dir-without-template option Oct 7, 2022

@chrmarti Christof Marti (chrmarti) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@samruddhikhandale
Samruddhi Khandale (samruddhikhandale) deleted the samruddhikhandale/modify-templates-publish branch October 7, 2022 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants