update files

This commit is contained in:
nuintun
2015-11-23 22:53:56 +08:00
parent 463b8998e5
commit 26eec2faf6
3 changed files with 22 additions and 24 deletions

View File

@@ -62,26 +62,34 @@ function verifyConfigure(configure){
return false;
}
if (!project.path || typeof project.path !== 'string') {
return false;
}
if (Array.isArray(project.env)) {
if (
!project.env.every(function (env){
return env.name && typeof env.name === 'string'
&& env.value && typeof env.value === 'string';
})
) {
var envValid = project.env.every(function (env){
return env.name && typeof env.name === 'string'
&& env.value && typeof env.value === 'string';
});
if (!envValid) {
return false;
}
} else {
return false
}
if (Array.isArray(project.command)) {
if (
!project.command.every(function (command){
return command.name && typeof command.name === 'string'
&& command.value && typeof command.value === 'string';
})
) {
var commandValid = project.command.every(function (command){
return command.name && typeof command.name === 'string'
&& command.value && typeof command.value === 'string';
});
if (commandValid) {
return false;
}
} else {
return false;
}
return true;