[opt] verify param template_search_path (#37)
parent
b37f2692e3
commit
874f966a40
|
|
@ -10,6 +10,7 @@ using Luban.Job.Common.Utils;
|
||||||
using Luban.Server;
|
using Luban.Server;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
@ -137,7 +138,15 @@ Options:
|
||||||
case "-t":
|
case "-t":
|
||||||
case "--template_search_path":
|
case "--template_search_path":
|
||||||
{
|
{
|
||||||
ops.TemplateSearchPath = args[++i];
|
var dirName = args[++i];
|
||||||
|
if (Directory.Exists(dirName))
|
||||||
|
{
|
||||||
|
ops.TemplateSearchPath = dirName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("[WARN] 对于Luban.ClientServer,参数 {0} {1} 路径不存在,忽略。", arg, dirName);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "--":
|
case "--":
|
||||||
|
|
@ -338,4 +347,4 @@ Options:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue