github.com/panekj/cli@v0.0.0-20230304125325-467dd2f3797e/cli/command/image/build/context_windows.go (about)

     1  package build
     2  
     3  import (
     4  	"path/filepath"
     5  
     6  	"github.com/docker/docker/pkg/longpath"
     7  )
     8  
     9  func getContextRoot(srcPath string) (string, error) {
    10  	cr, err := filepath.Abs(srcPath)
    11  	if err != nil {
    12  		return "", err
    13  	}
    14  	return longpath.AddPrefix(cr), nil
    15  }