mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Add gogs fix location command
This commit is contained in:
		| @@ -28,6 +28,10 @@ import ( | ||||
| 	"github.com/gogits/gogs/modules/setting" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| 	TPL_UPDATE_HOOK = "#!/usr/bin/env %s\n%s update $1 $2 $3\n" | ||||
| ) | ||||
|  | ||||
| var ( | ||||
| 	ErrRepoAlreadyExist  = errors.New("Repository already exist") | ||||
| 	ErrRepoNotExist      = errors.New("Repository does not exist") | ||||
| @@ -450,7 +454,7 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep | ||||
| 	rp := strings.NewReplacer("\\", "/", " ", "\\ ") | ||||
| 	// hook/post-update | ||||
| 	if err := createHookUpdate(filepath.Join(repoPath, "hooks", "update"), | ||||
| 		fmt.Sprintf("#!/usr/bin/env %s\n%s update $1 $2 $3\n", setting.ScriptType, | ||||
| 		fmt.Sprintf(TPL_UPDATE_HOOK, setting.ScriptType, | ||||
| 			rp.Replace(appPath))); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user