]> git.r.bdr.sh - rbdr/blog/blobdiff - lib/remotes/git.js
Lint
[rbdr/blog] / lib / remotes / git.js
index 32230aeb2ab5fad4c469a6a4e7b8bb8abfcf7388..75ef43ede2864ca68cd7070107abe9fa972bd42f 100644 (file)
@@ -1,12 +1,12 @@
-const { exec } = require('child_process');
-const { promisify } = require('util');
+import { exec } from 'child_process';
+import { promisify } from 'util';
 
 const internals = {
   // Promisified functions
-  exec: promisify(exec),
+  exec: promisify(exec)
 };
 
-module.exports = {
+export default {
   canHandle() {
 
     // For the future: actually check if it's a valid git url
@@ -28,7 +28,8 @@ module.exports = {
       await internals.exec(`cd ${blogDirectory} && git checkout .`);
     }
     catch {}
+
     await internals.exec(`cd ${blogDirectory} && git clean . -f`);
     await internals.exec(`cd ${blogDirectory} && git pull ${remote} main`);
   }
-}
+};