()
| 71 | } |
| 72 | |
| 73 | func (f *Finalizer) CopyProfileScripts() error { |
| 74 | profiledDir := filepath.Join(f.Stager.DepDir(), "profile.d") |
| 75 | if err := os.MkdirAll(profiledDir, 0755); err != nil { |
| 76 | return err |
| 77 | } |
| 78 | |
| 79 | scriptsDir := filepath.Join(f.Stager.DepDir(), "scripts") |
| 80 | if err := os.MkdirAll(scriptsDir, 0755); err != nil { |
| 81 | return err |
| 82 | } |
| 83 | |
| 84 | path := filepath.Join(f.Manifest.RootDir(), "profile") |
| 85 | files, err := os.ReadDir(path) |
| 86 | if err != nil { |
| 87 | return err |
| 88 | } |
| 89 | |
| 90 | for _, fi := range files { |
| 91 | if err := libbuildpack.CopyFile(filepath.Join(path, fi.Name()), filepath.Join(profiledDir, fi.Name())); err != nil { |
| 92 | return err |
| 93 | } |
| 94 | } |
| 95 | return nil |
| 96 | } |
| 97 | |
| 98 | func (f *Finalizer) WarnNoStart() error { |
| 99 | procfileExists, err := libbuildpack.FileExists(filepath.Join(f.Stager.BuildDir(), "Procfile")) |
no test coverage detected