mirror of
https://github.com/dorny/paths-filter.git
synced 2025-06-08 00:59:04 +00:00
Export files matching rules (#32)
* Export files matching rules * Improve debug output * Fix PR test workflow * Always quote output path + fix PR test * Use proper single quote escaping in workflow file * Improve error handling and docs for list-files input parameter
This commit is contained in:
parent
483986d0a7
commit
3f845744aa
8 changed files with 205 additions and 125 deletions
7
src/shell-escape.ts
Normal file
7
src/shell-escape.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Credits to https://github.com/xxorax/node-shell-escape
|
||||
|
||||
export default function shellEscape(value: string): string {
|
||||
return `'${value.replace(/'/g, "'\\''")}'`
|
||||
.replace(/^(?:'')+/g, '') // unduplicate single-quote at the beginning
|
||||
.replace(/\\'''/g, "\\'") // remove non-escaped single-quote if there are enclosed between 2 escaped
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue