mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +00:00
fixed builder panic
This commit is contained in:
parent
b4add30df2
commit
ed0719c624
3 changed files with 14 additions and 11 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -18,3 +18,5 @@ drone.sublime-workspace
|
|||
bindata.go
|
||||
|
||||
drone
|
||||
drone-build
|
||||
drone-bot
|
|
@ -128,17 +128,6 @@ func createClone(c *Context) error {
|
|||
return err
|
||||
}
|
||||
c.Clone.Dir = filepath.Join("/drone/src", url_.Host, c.Repo.FullName)
|
||||
|
||||
// attempt to extract the clone path. i'm not a huge fan of
|
||||
// this, by the way, but for now we'll keep it.
|
||||
// TODO consider moving this to a transform?
|
||||
pathv, ok := c.Conf.Clone.Config["path"]
|
||||
if ok {
|
||||
path, ok := pathv.(string)
|
||||
if ok {
|
||||
c.Clone.Dir = filepath.Join("/drone/src", path)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/drone/drone/common"
|
||||
"github.com/drone/drone/parser"
|
||||
|
@ -48,6 +49,17 @@ func setup(c *Context) error {
|
|||
c.Conf.Build.Environment = append(c.Conf.Build.Environment, env)
|
||||
}
|
||||
|
||||
// attempt to extract the clone path. i'm not a huge fan of
|
||||
// this, by the way, but for now we'll keep it.
|
||||
// TODO consider moving this to a transform?
|
||||
pathv, ok := c.Conf.Clone.Config["path"]
|
||||
if ok {
|
||||
path, ok := pathv.(string)
|
||||
if ok {
|
||||
c.Clone.Dir = filepath.Join("/drone/src", path)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue