INNER CODE UNIT · Go

exitWithError

buildpacks-community/kpack · cmd/build-waiter/main.go:147

func exitWithError(message, errorFile string) {
	if errorFile != "" {
		os.WriteFile(errorFile, []byte(message), 0666)
	}

	log.Fatal(message)
}

func watchForErrors(ctx context.Context, errFile string) {
	tickerChan := time.NewTicker(time.Second)
	defer tickerChan.Stop()

	for {
		select {
		case <-ctx.Done():
			return
		case <-tickerChan.C:
			if _, err := os.Stat(errFile); err == nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…