liyongli 2 anos atrás
pai
commit
6fa73a6059
1 arquivos alterados com 4 adições e 5 exclusões
  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);