mirror of
https://github.com/OBKoro1/autoCommit.git
synced 2024-11-22 10:29:23 +08:00
window文件夹路径
This commit is contained in:
parent
7e804c1f78
commit
c880c1ddcb
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Author : OBKoro1
|
||||
* Date : 2019-12-26 13:49:02
|
||||
* LastEditors : OBKoro1
|
||||
* LastEditTime : 2019-12-31 16:43:30
|
||||
* @LastEditors : OBKoro1
|
||||
* @LastEditTime : 2020-01-02 21:31:10
|
||||
* FilePath : /autoCommit/src/models/WebView.ts
|
||||
* Description : 创建webview
|
||||
* https://github.com/OBKoro1
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Author : OBKoro1
|
||||
* Date : 2019-12-30 16:59:30
|
||||
* LastEditors : OBKoro1
|
||||
* LastEditTime : 2020-01-02 16:22:22
|
||||
* @LastEditors : OBKoro1
|
||||
* @LastEditTime : 2020-01-02 20:45:40
|
||||
* FilePath : /autoCommit/src/models/commitHandle.ts
|
||||
* Description : commit 具体操作
|
||||
* https://github.com/OBKoro1
|
||||
@ -114,6 +114,7 @@ class CommitHandle {
|
||||
try {
|
||||
// 异步执行命令 让出线程 打印日志 等
|
||||
commitMsg = await new Promise((resolve, reject) => {
|
||||
// TODO: git push 到当前分支
|
||||
let cmd = `cd ${this.paramsObj.itemSrc} && git add . && git commit -m 'autoCommit' --date='${time}' && git pull && git push origin master`;
|
||||
exec(cmd, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Author : OBKoro1
|
||||
* Date : 2019-12-25 17:08:18
|
||||
* LastEditors : OBKoro1
|
||||
* LastEditTime : 2020-01-02 14:35:12
|
||||
* @LastEditors : OBKoro1
|
||||
* @LastEditTime : 2020-01-02 21:49:13
|
||||
* FilePath : /autoCommit/src/models/index.ts
|
||||
* Description : 插件逻辑入口
|
||||
* https://github.com/OBKoro1
|
||||
@ -58,7 +58,12 @@ class ExtensionLogic {
|
||||
canSelectMany: false // 是否可以选择多个文件
|
||||
});
|
||||
if (!urlArr) return; // 用户取消选择
|
||||
const itemSrc = urlArr[0].path;
|
||||
let itemSrc = urlArr[0].path;
|
||||
if(sep === `\\`){
|
||||
// window 系統用不同的路径
|
||||
itemSrc = urlArr[0].fsPath;
|
||||
}
|
||||
|
||||
if (this.hasGit(itemSrc)) {
|
||||
this.autoCommitView.postMessage('choose item success', itemSrc);
|
||||
} else {
|
||||
|
1979
yarn-error.log
Normal file
1979
yarn-error.log
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user