diff --git a/src/index.js b/src/index.js index 5c1f198..e8869d5 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ * Author : OBKoro1 * Date : 2019-12-19 20:23:57 * LastEditors : OBKoro1 - * LastEditTime : 2019-12-20 11:11:29 + * LastEditTime : 2019-12-20 11:26:24 * FilePath : /autoCommit/index.js * Description : 自动commit * https://github.com/OBKoro1 @@ -23,6 +23,7 @@ class autoCommit { this.commit() } commit() { + this.myExecSync(`sudo systemsetup -setusingnetworktime off && sudo systemsetup -setdate 09/02/19 && sudo systemsetup -setusingnetworktime on`) this.myExecSync(`git add . && git commit -m 'autoCommit' && git pull && git push`) } @@ -39,6 +40,7 @@ class autoCommit { }); return res; } catch (err) { + console.log(err) console.log(`执行命令出错:${cmd}`); } } diff --git a/test.md b/test.md index aafb919..f3ece57 100644 --- a/test.md +++ b/test.md @@ -1 +1 @@ -20/12/2019 11:12:22 \ No newline at end of file +20/12/2019 11:12:27 \ No newline at end of file