MCPcopy Create free account
hub / github.com/cloudfoundry/nodejs-buildpack / CopyProfileScripts

Method CopyProfileScripts

src/nodejs/finalize/finalize.go:73–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71}
72
73func (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
98func (f *Finalizer) WarnNoStart() error {
99 procfileExists, err := libbuildpack.FileExists(filepath.Join(f.Stager.BuildDir(), "Procfile"))

Callers 2

finalize_test.goFile · 0.80
RunFunction · 0.80

Calls 2

DepDirMethod · 0.65
RootDirMethod · 0.65

Tested by

no test coverage detected