Closed Lakshmikanth2001 closed 1 year ago
I was trying to find the file for this so I can do the whole pull request thing. (New to open source, sorry.) I couldn't find the relevant code, but try this regex.
(\/git\/hook\/)
Thank You for your suggestion based on your regex pattern i have build an another regex for this logic
/(\/\.git\/hooks\/)/
this is simple you can got to package.json
and edit editor/title
when clause and submit a pull
request, i hope this will be your first pull request to break the ice 😀
This Regex builder website can help you
Thanks for the opportunity! I love using regexr. It's the best tool for issues like this! I submitted the pull request w/ the correct regex.
"when": "resourcePath =~ /(\/\\.git\/hooks\/)/ || resourcePath =~ /(\\.git\\\\hooks\\\\)/",
Final regex which was working for both mac
and windows
is this one thank you for your contribution
i want to share small code snippet which can help in in budling regex inside string ( node.js env )
var regexParten = /(git\\hooks\\)/
regexParten.source
'(\\\\.git\\\\hooks\\\\)'
it help when your regex contains string escape characters ,
Thank You for your contribution
Regex
just verifies whether.git
andhook
both are present in path or not which not an accurate way to tell whether file belongs to./git/hook
this pathUpdated this regex to view the
runButton
only inside.git/hooks
directory