From 878337a2f2bc16f5fb212495dd5b0eeea495b79d Mon Sep 17 00:00:00 2001 From: pplokijuhyg <1162963624@qq.com> Date: Tue, 14 Jan 2020 14:22:21 +0800 Subject: [PATCH] req --- bin/reptile/binimport.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/reptile/binimport.js b/bin/reptile/binimport.js index 627d3ba..c09019a 100644 --- a/bin/reptile/binimport.js +++ b/bin/reptile/binimport.js @@ -4,10 +4,15 @@ let getreptilelist =(dirlist)=>{ let reptilelist = []; // console.log(dirlist) for(let i in dirlist){ + try{ + let reptile = require(__dirname + "/" + dirlist[i] +"/config.js" ) + console.log(reptile) + reptilelist.push(reptile) + + }catch{ + console.log("badimport") + } - let reptile = require(__dirname + "/" + dirlist[i] +"/config.js" ) - console.log(reptile) - reptilelist.push(reptile) } res(reptilelist) })