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
1 changed files with 3 additions and 1 deletions

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
}