INNER CODE UNIT · Go
copy
buildpacks-community/kpack · cmd/build-waiter/main.go:89
func copy(to string) error {
if to == "" {
log.Fatal("-to must be specified with -mode=copy")
}
binaryPath, err := os.Executable()
if err != nil {
return err
}
srcFile, err := os.Open(binaryPath)
if err != nil {
return err
}
defer srcFile.Close()
needsDelete, err := exists(to)
if err != nil {
return err
}