specify the invalid bind name in error message
This commit is contained in:
@@ -336,7 +336,7 @@ function validateEnv(env) {
|
||||
function validateBinds(binds) {
|
||||
for (let name of Object.keys(binds)) {
|
||||
// just have friendly characters under /media
|
||||
if (!/^[-0-9a-zA-Z_@$=#.%+]+$/.test(name)) return new BoxError(BoxError.BAD_FIELD, 'Invalid bind name');
|
||||
if (!/^[-0-9a-zA-Z_@$=#.%+]+$/.test(name)) return new BoxError(BoxError.BAD_FIELD, `Invalid bind name: ${name}`);
|
||||
|
||||
const bind = binds[name];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user