Fix mistake and replace deprecated method.

This commit is contained in:
Gert Hengeveld 2020-11-22 14:08:06 +01:00
parent c483b70509
commit 481007afa3

View File

@ -106,8 +106,7 @@ async function copyAllStaticFiles(staticDir: any[] | undefined, outputDir: strin
const [currentStaticDir, staticEndpoint] = dir.split(':').concat('/');
const localStaticPath = path.resolve(currentStaticDir);
// @ts-ignore
if (await !fs.exists(localStaticPath)) {
if (!(await fs.pathExists(localStaticPath))) {
logger.error(`Error: no such directory to load static files: ${localStaticPath}`);
process.exit(-1);
}