<commit_before>package cmd

import (
	"context"
	"os"
	"path/filepath"

	"github.com/gobuffalo/buffalo/buffalo/cmd/build"
	"github.com/gobuffalo/buffalo/meta"
	"github.com/markbates/sigtx"
	"github.com/pkg/errors"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
)

var buildOptions = struct {
	build.Options
	SkipAssets bool
	Tags       string
}{
	Options: build.Options{},
}

var xbuildCmd = &cobra.Command{
	Use:     "build",
	Aliases: []string{"b", "bill"},
	Short:   "Builds a Buffalo binary, including bundling of assets (packr & webpack)",
	RunE: func(cmd *cobra.Command, args []string) error {
		ctx, cancel := sigtx.WithCancel(context.Background(), os.Interrupt)
		defer cancel()

		buildOptions.Options.WithAssets = !buildOptions.SkipAssets

		if buildOptions.Debug {
			logrus.SetLevel(logrus.DebugLevel)
		}

		b := build.New(ctx, buildOptions.Options)
		if buildOptions.Tags != "" {
			b.Tags = append(b.Tags, buildOptions.Tags)
		}

		go func() {
			<-ctx.Done()
			if ctx.Err() == context.Canceled {
				logrus.Info("~~~ BUILD CANCELLED ~~~")
				err := b.Cleanup()
				if err != nil {
					logrus.Fatal(err)
				}
			}
		}()

		err := b.Run()
		if err != nil {
			return errors.WithStack(err)
		}

		logrus.Infof("\nYou application was successfully built at %s\n", filepath.Join(b.Root, b.Bin))

		return nil
	},
}<commit_msg>fixes an issue where the built bin location was being displayed wrong (#1200)<commit_after>package cmd

import (
	"context"
	"os"
	"path/filepath"

	"github.com/gobuffalo/buffalo/buffalo/cmd/build"
	"github.com/gobuffalo/buffalo/meta"
	"github.com/markbates/sigtx"
	"github.com/pkg/errors"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
)

var buildOptions = struct {
	build.Options
	SkipAssets bool
	Tags       string
}{
	Options: build.Options{},
}

var xbuildCmd = &cobra.Command{
	Use:     "build",
	Aliases: []string{"b", "bill"},
	Short:   "Builds a Buffalo binary, including bundling of assets (packr & webpack)",
	RunE: func(cmd *cobra.Command, args []string) error {
		ctx, cancel := sigtx.WithCancel(context.Background(), os.Interrupt)
		defer cancel()

		buildOptions.Options.WithAssets = !buildOptions.SkipAssets

		if buildOptions.Debug {
			logrus.SetLevel(logrus.DebugLevel)
		}

		b := build.New(ctx, buildOptions.Options)
		if buildOptions.Tags != "" {
			b.Tags = append(b.Tags, buildOptions.Tags)
		}

		go func() {
			<-ctx.Done()
			if ctx.Err() == context.Canceled {
				logrus.Info("~~~ BUILD CANCELLED ~~~")
				err := b.Cleanup()
				if err != nil {
					logrus.Fatal(err)
				}
			}
		}()

		err := b.Run()
		if err != nil {
			return errors.WithStack(err)
		}

		bin, _ := filepath.Abs(b.Bin)
		logrus.Infof("\nYou application was successfully built at %s\n", bin)

		return nil
	},
}
{'fraction_non_alphanumeric': 0.15384615384615385, 'fraction_numerical': 0.00288912964969303, 'mean_word_length': 3.489465153970827, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2316392', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1031, 'n_words': 211}