Adding a regex to allow certain paths with : on windows.
This commit is contained in:
parent
a6e409a062
commit
1d99cc654a
|
@ -1,9 +1,11 @@
|
||||||
const path = require("path")
|
const path = require("path")
|
||||||
|
|
||||||
|
const regex = new RegExp(/:(?![\\/])/g)
|
||||||
|
|
||||||
function sanitiseArgs(args) {
|
function sanitiseArgs(args) {
|
||||||
let sanitised = []
|
let sanitised = []
|
||||||
for (let arg of args) {
|
for (let arg of args) {
|
||||||
sanitised.push(arg.replace(":", ""))
|
sanitised.push(arg.replace(regex, ""))
|
||||||
}
|
}
|
||||||
return sanitised
|
return sanitised
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue