1
0
Fork 0
mirror of synced 2024-07-01 20:41:03 +12:00

Adding a regex to allow certain paths with : on windows.

This commit is contained in:
mike12345567 2020-10-07 11:04:36 +01:00
parent a6e409a062
commit 1d99cc654a

View file

@ -1,9 +1,11 @@
const path = require("path")
const regex = new RegExp(/:(?![\\/])/g)
function sanitiseArgs(args) {
let sanitised = []
for (let arg of args) {
sanitised.push(arg.replace(":", ""))
sanitised.push(arg.replace(regex, ""))
}
return sanitised
}