Skip to content

Commit 50e42a3

Browse files
committed
fix regex
1 parent 32c074b commit 50e42a3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

build/templates/setup.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ steps:
110110
"",
111111
"async function rewrite(file, registry) {",
112112
" let contents = await fs.readFile(file, 'utf8');",
113-
" contents = contents.replace(/https:\\/\\/registry\\.[^.]+\\.(com|org)\\//g, registry);",
113+
" const re = new RegExp('https://registry\\\\.[^.]+\\\\.(com|org)/', 'g');",
114+
" contents = contents.replace(re, registry);",
114115
" await fs.writeFile(file, contents);",
115116
"}",
116117
"",

0 commit comments

Comments
 (0)