|
@@ -47,11 +47,10 @@ const { execSync } = require("child_process");
|
|
|
try {
|
|
|
await sftp.connect(config.romote);
|
|
|
const romotePath = config.path.romotePath;
|
|
|
- const isCss = sftp.exists(romotePath + "/css");
|
|
|
- const isFonts = sftp.exists(romotePath + "/fonts");
|
|
|
- const isJs = sftp.exists(romotePath + "/js");
|
|
|
- const isIndexHtml = sftp.exists(romotePath + "/index.html");
|
|
|
- console.log("css ---> ",isCss)
|
|
|
+ const isCss = await sftp.exists(romotePath + "/css");
|
|
|
+ const isFonts = await sftp.exists(romotePath + "/fonts");
|
|
|
+ const isJs = await sftp.exists(romotePath + "/js");
|
|
|
+ const isIndexHtml = await sftp.exists(romotePath + "/index.html");
|
|
|
isCss && await sftp.rmdir(romotePath + "/css", true);
|
|
|
isFonts && await sftp.rmdir(romotePath + "/fonts", true);
|
|
|
isJs && await sftp.rmdir(romotePath + "/js", true);
|