修复无法自动创建 .gitignore问题
This commit is contained in:
parent
670c5b1466
commit
d5e1721d1f
9
git.go
9
git.go
@ -7,7 +7,11 @@
|
||||
// Date : 2022-06-14 20:02
|
||||
package command
|
||||
|
||||
import "git.zhangdeman.cn/zhangdeman/command/define"
|
||||
import (
|
||||
"os"
|
||||
|
||||
"git.zhangdeman.cn/zhangdeman/command/define"
|
||||
)
|
||||
|
||||
// Git ...
|
||||
//
|
||||
@ -142,7 +146,8 @@ release
|
||||
WorkDir: g.workDir,
|
||||
CmdPath: "",
|
||||
Param: nil,
|
||||
Error: File(g.workDir, ".gitignore").Write([]byte(baseFileContent)),
|
||||
Error: File(g.workDir, ".gitignore").AutoCreate().SetClearHasContentForWrite().
|
||||
SetOpenFlag(os.O_TRUNC, os.O_RDWR, os.O_CREATE).Write([]byte(baseFileContent)),
|
||||
Output: nil,
|
||||
StartTime: 0,
|
||||
FinishTime: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user