This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
wangwei
/
aiforge
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
128
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
fix 500 when edit hook (
#8782
)
tags/v1.21.12.1
Lunny Xiao
GitHub
6 years ago
parent
232340f5e3
commit
21dfe1b256
No known key found for this signature in database
GPG Key ID:
4AEE18F83AFDEB23
1 changed files
with
5 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-0
modules/git/hook.go
+ 5
- 0
modules/git/hook.go
View File
@@ -90,6 +90,11 @@ func (h *Hook) Update() error {
h.IsActive = false
h.IsActive = false
return nil
return nil
}
}
d := filepath.Dir(h.path)
if err := os.MkdirAll(d, os.ModePerm); err != nil {
return err
}
err := ioutil.WriteFile(h.path, []byte(strings.Replace(h.Content, "\r", "", -1)), os.ModePerm)
err := ioutil.WriteFile(h.path, []byte(strings.Replace(h.Content, "\r", "", -1)), os.ModePerm)
if err != nil {
if err != nil {
return err
return err
Write
Preview
Loading…
Cancel
Save