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

Fix an issue with the type of case in the custom file names #109

Merged
merged 1 commit into from
May 18, 2024

Conversation

this-is-alkv
Copy link
Contributor

File names like template-name, template_name etc. are working fine

Copy link
Owner

@arminbro arminbro left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @this-is-alkv. I'll merge your PR.

@arminbro arminbro merged commit e362d3c into arminbro:master May 18, 2024
Copy link

🎉 This PR is included in version 8.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@@ -65,7 +65,7 @@ function getCustomTemplate(componentName, templatePath) {

try {
const template = readFileSync(templatePath, 'utf8');
const filename = path.basename(templatePath).replace('TemplateName', componentName);
const filename = path.basename(templatePath).replace(/template[|_-]?name/i, componentName);
Copy link
Owner

Choose a reason for hiding this comment

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

@this-is-alkv When I initially reviewed your pull request, I missed the pipe symbol | in your regex search. I'm unsure why you added it, but using a vertical bar (|) in filenames is either restricted or highly discouraged due to its special meaning in command-line interfaces and potential issues with file system compatibility.

I've removed it in the latest version of GRC and just wanted to give you an FYI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants