liyongli преди 2 години
родител
ревизия
6fa73a6059
променени са 1 файла, в които са добавени 4 реда и са изтрити 5 реда
  1. 4 5
      saveOSSAGitte.js

+ 4 - 5
saveOSSAGitte.js

@@ -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);