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

Method WarnNoStart

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

Source from the content-addressed store, hash-verified

96}
97
98func (f *Finalizer) WarnNoStart() error {
99 procfileExists, err := libbuildpack.FileExists(filepath.Join(f.Stager.BuildDir(), "Procfile"))
100 if err != nil {
101 return err
102 }
103 serverJsExists, err := libbuildpack.FileExists(filepath.Join(f.Stager.BuildDir(), "server.js"))
104 if err != nil {
105 return err
106 }
107
108 if !procfileExists && !serverJsExists && f.StartScript == "" {
109 warning := "This app may not specify any way to start a node process\n"
110 warning += "See: https://docs.cloudfoundry.org/buildpacks/node/node-tips.html#start"
111 f.Log.Warning(warning)
112 }
113
114 return nil
115}

Callers 2

finalize_test.goFile · 0.80
RunFunction · 0.80

Calls 1

BuildDirMethod · 0.65

Tested by

no test coverage detected