mirror of https://github.com/docker/cli.git
16 lines
249 B
Go
16 lines
249 B
Go
|
package build
|
||
|
|
||
|
import (
|
||
|
"path/filepath"
|
||
|
|
||
|
"github.com/docker/docker/pkg/longpath"
|
||
|
)
|
||
|
|
||
|
func getContextRoot(srcPath string) (string, error) {
|
||
|
cr, err := filepath.Abs(srcPath)
|
||
|
if err != nil {
|
||
|
return "", err
|
||
|
}
|
||
|
return longpath.AddPrefix(cr), nil
|
||
|
}
|