Fix a minor issue with slash detection

This commit is contained in:
MagicalCodeMonkey 2020-03-15 01:02:33 -04:00
parent 30fbcf63fb
commit 0bbdf6affc
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ module.exports = function () {
output[setting.local] = output[setting.local].replace(/\/+$/, "");
}
// Add leading slash, if not provided
if (setting.local == 'webroot' && !output[setting.local].startsWith("/")) {
if (setting.local == 'webroot' && output[setting.local].length > 1 && !output[setting.local].startsWith("/")) {
console.log(`${setting.local}/${setting.env} should always start with '/'. Adding the leading slash for you.`);
// Make sure it starts with one leading slash
output[setting.local] = `/${output[setting.local]}`;