Skip to content

Commit 3313495

Browse files
committed
Fixed permission issue on new created plugins
1 parent bb3893c commit 3313495

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pipeline/build_golang.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,13 @@ func (b *BuildPipelineGolang) CopyBinary(p *gaia.CreatePipeline) error {
107107
src := p.Pipeline.Repo.LocalDest + string(os.PathSeparator) + appendTypeToName(p.Pipeline.Name, p.Pipeline.Type)
108108
dest := gaia.Cfg.PipelinePath + string(os.PathSeparator) + appendTypeToName(p.Pipeline.Name, p.Pipeline.Type)
109109

110-
return copyFileContents(src, dest)
110+
// Copy binary
111+
if err := copyFileContents(src, dest); err != nil {
112+
return err
113+
}
114+
115+
// Set +x (execution right) for pipeline
116+
return os.Chmod(dest, 0766)
111117
}
112118

113119
// copyFileContents copies the content from source to destination.

0 commit comments

Comments
 (0)