From e0d93787c8309149039f2ae13dbcf1c801861029 Mon Sep 17 00:00:00 2001 From: David Freilich Date: Wed, 18 Nov 2020 12:45:19 +0200 Subject: [PATCH] Fix imports * Rename trusted-builder to trusted-builders, to follow RFC * Change Config to NewConfigCommand Signed-off-by: David Freilich --- acceptance/acceptance_test.go | 53 ++++++++----------- cmd/cmd.go | 2 +- internal/commands/config/config.go | 5 +- internal/commands/config/config_test.go | 16 +++--- .../commands/config/list_trusted_builders.go | 7 ++- .../config/list_trusted_builders_test.go | 6 +-- internal/commands/config/trust_builder.go | 5 +- .../commands/config/trust_builder_test.go | 3 +- internal/commands/config/trusted_builder.go | 20 ++++--- .../commands/config/trusted_builder_test.go | 34 ++++++------ internal/commands/config/untrust_builder.go | 5 +- .../commands/config/untrust_builder_test.go | 3 +- 12 files changed, 66 insertions(+), 93 deletions(-) diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index eb75909595..c40c772cc8 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -20,30 +20,26 @@ import ( "testing" "time" - "github.com/buildpacks/pack/internal/style" - - pubcfg "github.com/buildpacks/pack/config" - - "github.com/ghodss/yaml" - "github.com/pelletier/go-toml" - dockertypes "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" + "github.com/ghodss/yaml" "github.com/google/go-containerregistry/pkg/name" + "github.com/pelletier/go-toml" "github.com/pkg/errors" "github.com/sclevine/spec" "github.com/sclevine/spec/report" - "github.com/buildpacks/pack/acceptance/buildpacks" - "github.com/buildpacks/pack/acceptance/assertions" + "github.com/buildpacks/pack/acceptance/buildpacks" "github.com/buildpacks/pack/acceptance/config" "github.com/buildpacks/pack/acceptance/invoke" + pubcfg "github.com/buildpacks/pack/config" "github.com/buildpacks/pack/internal/archive" "github.com/buildpacks/pack/internal/cache" + "github.com/buildpacks/pack/internal/style" h "github.com/buildpacks/pack/testhelpers" ) @@ -181,9 +177,9 @@ func testWithoutSpecificBuilderRequirement( }) when("pack config", func() { - when("trusted-builder", func() { + when("trusted-builders", func() { it("prints list of trusted builders", func() { - output := pack.RunSuccessfully("config", "trusted-builder") + output := pack.RunSuccessfully("config", "trusted-builders") assertOutput := assertions.NewOutputAssertionManager(t, output) assertOutput.IncludesTrustedBuildersHeading() @@ -197,7 +193,7 @@ func testWithoutSpecificBuilderRequirement( it("sets the builder as trusted in ~/.pack/config.toml", func() { builderName := "some-builder" + h.RandString(10) - output := pack.RunSuccessfully("config", "trusted-builder", "add", builderName) + output := pack.RunSuccessfully("config", "trusted-builders", "add", builderName) assert.NotContains(output, "has been deprecated") assert.Contains(pack.ConfigFileContents(), builderName) }) @@ -207,11 +203,11 @@ func testWithoutSpecificBuilderRequirement( it("removes the previously trusted builder from ~/${PACK_HOME}/config.toml", func() { builderName := "some-builder" + h.RandString(10) - pack.JustRunSuccessfully("config", "trusted-builder", "add", builderName) + pack.JustRunSuccessfully("config", "trusted-builders", "add", builderName) assert.Contains(pack.ConfigFileContents(), builderName) - output := pack.RunSuccessfully("config", "trusted-builder", "remove", builderName) + output := pack.RunSuccessfully("config", "trusted-builders", "remove", builderName) assert.NotContains(output, "has been deprecated") assert.NotContains(pack.ConfigFileContents(), builderName) @@ -220,7 +216,7 @@ func testWithoutSpecificBuilderRequirement( when("list", func() { it("prints list of trusted builders", func() { - output := pack.RunSuccessfully("config", "trusted-builder", "list") + output := pack.RunSuccessfully("config", "trusted-builders", "list") assertOutput := assertions.NewOutputAssertionManager(t, output) assertOutput.IncludesTrustedBuildersHeading() @@ -230,12 +226,12 @@ func testWithoutSpecificBuilderRequirement( assert.NotContains(output, "has been deprecated") }) - it("shows a builder trusted by pack config trusted-builder add", func() { + it("shows a builder trusted by pack config trusted-builders add", func() { builderName := "some-builder" + h.RandString(10) - pack.JustRunSuccessfully("config", "trusted-builder", "add", builderName) + pack.JustRunSuccessfully("config", "trusted-builders", "add", builderName) - output := pack.RunSuccessfully("config", "trusted-builder", "list") + output := pack.RunSuccessfully("config", "trusted-builders", "list") assert.Contains(output, builderName) }) }) @@ -828,13 +824,10 @@ func testAcceptance( it.Before(func() { pack.JustRunSuccessfully("set-default-builder", builderName) - var trustBuilder bool - if pack.Supports("config trusted-builder add") { - pack.JustRunSuccessfully("config", "trusted-builder", "add", builderName) - trustBuilder = true - } else if pack.Supports("trust-builder") { + if pack.Supports("config trusted-builders add") { + pack.JustRunSuccessfully("config", "trusted-builders", "add", builderName) + } else { pack.JustRunSuccessfully("trust-builder", builderName) - trustBuilder = true } // Technically the creator is supported as of platform API version 0.3 (lifecycle version 0.7.0+) but earlier versions @@ -842,7 +835,7 @@ func testAcceptance( creatorSupported := lifecycle.SupportsFeature(config.CreatorInLifecycle) && pack.SupportsFeature(invoke.CreatorInPack) - usingCreator = creatorSupported && trustBuilder + usingCreator = creatorSupported }) it("creates a runnable, rebuildable image on daemon from app dir", func() { @@ -2077,10 +2070,8 @@ include = [ "*.jar", "media/mountain.jpg", "media/person.png" ] }) it("indicates builder is trusted", func() { - h.SkipUnless(t, pack.Supports("trust-builder"), "version of pack doesn't trust-builder command") - - if pack.Supports("config trusted-builder add") { - pack.JustRunSuccessfully("config", "trusted-builder", "add", builderName) + if pack.Supports("config trusted-builders add") { + pack.JustRunSuccessfully("config", "trusted-builders", "add", builderName) } else { pack.JustRunSuccessfully("trust-builder", builderName) } @@ -2126,8 +2117,8 @@ include = [ "*.jar", "media/mountain.jpg", "media/person.png" ] var buildRunImage func(string, string, string) it.Before(func() { - if pack.Supports("config trusted-builder add") { - pack.JustRunSuccessfully("config", "trusted-builder", "add", builderName) + if pack.Supports("config trusted-builders add") { + pack.JustRunSuccessfully("config", "trusted-builders", "add", builderName) } else { pack.JustRunSuccessfully("trust-builder", builderName) } diff --git a/cmd/cmd.go b/cmd/cmd.go index 7d0e60fced..19fb56d294 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -102,7 +102,7 @@ func NewPackCommand(logger ConfigurableLogger) (*cobra.Command, error) { rootCmd.AddCommand(commands.CompletionCommand(logger)) - rootCmd.AddCommand(cmdConfig.Config(logger, cfg, cfgPath)) + rootCmd.AddCommand(cmdConfig.NewConfigCommand(logger, cfg, cfgPath)) rootCmd.AddCommand(stack.Stack(logger)) rootCmd.Version = pack.Version diff --git a/internal/commands/config/config.go b/internal/commands/config/config.go index a6a8974119..9bc701a94c 100644 --- a/internal/commands/config/config.go +++ b/internal/commands/config/config.go @@ -3,15 +3,14 @@ package config import ( "fmt" - "github.com/buildpacks/pack/internal/commands" - "github.com/spf13/cobra" + "github.com/buildpacks/pack/internal/commands" "github.com/buildpacks/pack/internal/config" "github.com/buildpacks/pack/logging" ) -func Config(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command { +func NewConfigCommand(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command { cmd := &cobra.Command{ Use: "config", Short: "Interact with pack config", diff --git a/internal/commands/config/config_test.go b/internal/commands/config/config_test.go index b249bc7328..e92fb7cc88 100644 --- a/internal/commands/config/config_test.go +++ b/internal/commands/config/config_test.go @@ -7,6 +7,9 @@ import ( "path/filepath" "testing" + "github.com/heroku/color" + "github.com/sclevine/spec" + "github.com/sclevine/spec/report" "github.com/spf13/cobra" cmdConfig "github.com/buildpacks/pack/internal/commands/config" @@ -14,10 +17,6 @@ import ( ilogging "github.com/buildpacks/pack/internal/logging" "github.com/buildpacks/pack/logging" h "github.com/buildpacks/pack/testhelpers" - - "github.com/heroku/color" - "github.com/sclevine/spec" - "github.com/sclevine/spec/report" ) func TestConfigCommand(t *testing.T) { @@ -41,16 +40,13 @@ func testConfigCommand(t *testing.T, when spec.G, it spec.S) { logger = ilogging.NewLogWithWriters(&outBuf, &outBuf) tempPackHome, err = ioutil.TempDir("", "pack-home") h.AssertNil(t, err) - h.AssertNil(t, os.Setenv("PACK_HOME", tempPackHome)) configPath = filepath.Join(tempPackHome, "config.toml") - command = cmdConfig.Config(logger, config.Config{}, configPath) + command = cmdConfig.NewConfigCommand(logger, config.Config{}, configPath) command.SetOut(logging.GetWriterForLevel(logger, logging.InfoLevel)) - //command.SetErr(logging.GetWriterForLevel(logger, logging.ErrorLevel)) }) it.After(func() { - h.AssertNil(t, os.Unsetenv("PACK_HOME")) h.AssertNil(t, os.RemoveAll(tempPackHome)) }) @@ -64,9 +60,9 @@ func testConfigCommand(t *testing.T, when spec.G, it spec.S) { }) }) - when("trusted-builder", func() { + when("trusted-builders", func() { it("prints list of trusted builders", func() { - command.SetArgs([]string{"trusted-builder"}) + command.SetArgs([]string{"trusted-builders"}) h.AssertNil(t, command.Execute()) h.AssertContainsAllInOrder(t, outBuf, diff --git a/internal/commands/config/list_trusted_builders.go b/internal/commands/config/list_trusted_builders.go index f1a2889211..f6c77c63aa 100644 --- a/internal/commands/config/list_trusted_builders.go +++ b/internal/commands/config/list_trusted_builders.go @@ -1,15 +1,14 @@ package config import ( - "github.com/buildpacks/pack/internal/commands" - "github.com/spf13/cobra" + "github.com/buildpacks/pack/internal/commands" "github.com/buildpacks/pack/internal/config" "github.com/buildpacks/pack/logging" ) -// Deprecated: Use `list` instead +// Deprecated: Use `trusted-builders list` instead func ListTrustedBuilders(logger logging.Logger, cfg config.Config) *cobra.Command { cmd := &cobra.Command{ Use: "list-trusted-builders", @@ -18,7 +17,7 @@ func ListTrustedBuilders(logger logging.Logger, cfg config.Config) *cobra.Comman Example: "pack list-trusted-builders", Hidden: true, RunE: commands.LogError(logger, func(cmd *cobra.Command, args []string) error { - commands.DeprecationWarning(logger, "list-trusted-builders", "config trusted-builder list") + commands.DeprecationWarning(logger, "list-trusted-builders", "config trusted-builders list") listTrustedBuilders(logger, cfg) return nil }), diff --git a/internal/commands/config/list_trusted_builders_test.go b/internal/commands/config/list_trusted_builders_test.go index 2e21d0718f..aa06eb34e3 100644 --- a/internal/commands/config/list_trusted_builders_test.go +++ b/internal/commands/config/list_trusted_builders_test.go @@ -6,15 +6,13 @@ import ( "os" "testing" - cmdConfig "github.com/buildpacks/pack/internal/commands/config" - - "github.com/buildpacks/pack/internal/config" - "github.com/heroku/color" "github.com/sclevine/spec" "github.com/sclevine/spec/report" "github.com/spf13/cobra" + cmdConfig "github.com/buildpacks/pack/internal/commands/config" + "github.com/buildpacks/pack/internal/config" ilogging "github.com/buildpacks/pack/internal/logging" "github.com/buildpacks/pack/logging" h "github.com/buildpacks/pack/testhelpers" diff --git a/internal/commands/config/trust_builder.go b/internal/commands/config/trust_builder.go index a86689a96d..c2d6be1efc 100644 --- a/internal/commands/config/trust_builder.go +++ b/internal/commands/config/trust_builder.go @@ -5,12 +5,11 @@ import ( "github.com/spf13/cobra" "github.com/buildpacks/pack/internal/commands" - "github.com/buildpacks/pack/internal/config" "github.com/buildpacks/pack/logging" ) -// Deprecated: Use `trusted-builder add` instead +// Deprecated: Use `trusted-builders add` instead func TrustBuilder(logger logging.Logger, cfg config.Config) *cobra.Command { cmd := &cobra.Command{ Use: "trust-builder ", @@ -20,7 +19,7 @@ func TrustBuilder(logger logging.Logger, cfg config.Config) *cobra.Command { Example: "pack trust-builder cnbs/sample-stack-run:bionic", Hidden: true, RunE: commands.LogError(logger, func(cmd *cobra.Command, args []string) error { - commands.DeprecationWarning(logger, "trust-builder", "config trusted-builder add") + commands.DeprecationWarning(logger, "trust-builder", "config trusted-builders add") configPath, err := config.DefaultConfigPath() if err != nil { return errors.Wrap(err, "getting config path") diff --git a/internal/commands/config/trust_builder_test.go b/internal/commands/config/trust_builder_test.go index 461adb5cda..2573519005 100644 --- a/internal/commands/config/trust_builder_test.go +++ b/internal/commands/config/trust_builder_test.go @@ -7,13 +7,12 @@ import ( "path/filepath" "testing" - cmdConfig "github.com/buildpacks/pack/internal/commands/config" - "github.com/heroku/color" "github.com/sclevine/spec" "github.com/sclevine/spec/report" "github.com/spf13/cobra" + cmdConfig "github.com/buildpacks/pack/internal/commands/config" "github.com/buildpacks/pack/internal/config" ilogging "github.com/buildpacks/pack/internal/logging" "github.com/buildpacks/pack/logging" diff --git a/internal/commands/config/trusted_builder.go b/internal/commands/config/trusted_builder.go index 30bff88127..e6c1d64725 100644 --- a/internal/commands/config/trusted_builder.go +++ b/internal/commands/config/trusted_builder.go @@ -4,40 +4,38 @@ import ( "sort" "github.com/pkg/errors" - - "github.com/buildpacks/pack/internal/commands" - "github.com/buildpacks/pack/internal/style" - "github.com/spf13/cobra" + "github.com/buildpacks/pack/internal/commands" "github.com/buildpacks/pack/internal/config" + "github.com/buildpacks/pack/internal/style" "github.com/buildpacks/pack/logging" ) func trustedBuilder(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command { cmd := &cobra.Command{ - Use: "trusted-builder", + Use: "trusted-builders", Short: "Interact with trusted builders", - Aliases: []string{"trusted-builders"}, + Aliases: []string{"trusted-builder"}, RunE: commands.LogError(logger, func(cmd *cobra.Command, args []string) error { listTrustedBuilders(logger, cfg) return nil }), } - addCmd := generateAdd("trusted-builder", logger, cfg, cfgPath, addTrustedBuilder) + addCmd := generateAdd("trusted-builders", logger, cfg, cfgPath, addTrustedBuilder) addCmd.Long = "Trust builder.\n\nWhen building with this builder, all lifecycle phases will be run in a single container using the builder image." - addCmd.Example = "pack config trusted-builder add cnbs/sample-stack-run:bionic" + addCmd.Example = "pack config trusted-builders add cnbs/sample-stack-run:bionic" cmd.AddCommand(addCmd) - rmCmd := generateRemove("trusted-builder", logger, cfg, cfgPath, removeTrustedBuilder) + rmCmd := generateRemove("trusted-builders", logger, cfg, cfgPath, removeTrustedBuilder) rmCmd.Long = "Stop trusting builder.\n\nWhen building with this builder, all lifecycle phases will be no longer be run in a single container using the builder image." - rmCmd.Example = "pack config trusted-builder remove cnbs/sample-stack-run:bionic" + rmCmd.Example = "pack config trusted-builders remove cnbs/sample-stack-run:bionic" cmd.AddCommand(rmCmd) listCmd := generateListCmd("trusted-builders", logger, cfg, listTrustedBuilders) listCmd.Long = "List Trusted Builders.\n\nShow the builders that are either trusted by default or have been explicitly trusted locally using `trust-builder`" - listCmd.Example = "pack config trusted-builder list" + listCmd.Example = "pack config trusted-builders list" cmd.AddCommand(listCmd) return cmd } diff --git a/internal/commands/config/trusted_builder_test.go b/internal/commands/config/trusted_builder_test.go index 6e81700b53..5a0db31a26 100644 --- a/internal/commands/config/trusted_builder_test.go +++ b/internal/commands/config/trusted_builder_test.go @@ -8,8 +8,6 @@ import ( "path/filepath" "testing" - "github.com/buildpacks/pack/internal/style" - "github.com/heroku/color" "github.com/sclevine/spec" "github.com/sclevine/spec/report" @@ -18,6 +16,7 @@ import ( cmdConfig "github.com/buildpacks/pack/internal/commands/config" "github.com/buildpacks/pack/internal/config" ilogging "github.com/buildpacks/pack/internal/logging" + "github.com/buildpacks/pack/internal/style" "github.com/buildpacks/pack/logging" h "github.com/buildpacks/pack/testhelpers" ) @@ -43,21 +42,18 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { logger = ilogging.NewLogWithWriters(&outBuf, &outBuf) tempPackHome, err = ioutil.TempDir("", "pack-home") h.AssertNil(t, err) - h.AssertNil(t, os.Setenv("PACK_HOME", tempPackHome)) configPath = filepath.Join(tempPackHome, "config.toml") - command = cmdConfig.Config(logger, config.Config{}, configPath) + command = cmdConfig.NewConfigCommand(logger, config.Config{}, configPath) command.SetOut(logging.GetWriterForLevel(logger, logging.InfoLevel)) - //command.SetErr(logging.GetWriterForLevel(logger, logging.ErrorLevel)) }) it.After(func() { - h.AssertNil(t, os.Unsetenv("PACK_HOME")) h.AssertNil(t, os.RemoveAll(tempPackHome)) }) - when("list", func() { - var args = []string{"trusted-builder", "list"} + when("trusted-builders list", func() { + var args = []string{"trusted-builders", "list"} it("shows suggested builders and locally trusted builder in alphabetical order", func() { builderName := "great-builder-" + h.RandString(8) @@ -76,7 +72,7 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { outBuf.Reset() configManager := newConfigManager(t, configPath) - command = cmdConfig.Config(logger, configManager.configWithTrustedBuilders(builderName), configPath) + command = cmdConfig.NewConfigCommand(logger, configManager.configWithTrustedBuilders(builderName), configPath) command.SetArgs(args) h.AssertNil(t, command.Execute()) @@ -92,8 +88,8 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { }) }) - when("trusted-builder add", func() { - var args = []string{"trusted-builder", "add"} + when("trusted-builders add", func() { + var args = []string{"trusted-builders", "add"} when("no builder is provided", func() { it("prints usage", func() { command.SetArgs(args) @@ -105,7 +101,7 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { it("fails", func() { tempPath := filepath.Join(tempPackHome, "non-existent-file.toml") h.AssertNil(t, ioutil.WriteFile(tempPath, []byte("something"), 0111)) - command = cmdConfig.Config(logger, config.Config{}, tempPath) + command = cmdConfig.NewConfigCommand(logger, config.Config{}, tempPath) command.SetOut(logging.GetWriterForLevel(logger, logging.InfoLevel)) command.SetArgs(append(args, "some-builder")) h.AssertError(t, command.Execute(), "writing config") @@ -155,9 +151,9 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { }) }) - when("trusted-builder remove", func() { + when("trusted-builders remove", func() { var ( - args = []string{"trusted-builder", "remove"} + args = []string{"trusted-builders", "remove"} configManager configManager ) @@ -168,7 +164,7 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { when("no builder is provided", func() { it("prints usage", func() { cfg := configManager.configWithTrustedBuilders() - command := cmdConfig.Config(logger, cfg, configPath) + command := cmdConfig.NewConfigCommand(logger, cfg, configPath) command.SetArgs(args) command.SetOut(&outBuf) @@ -183,7 +179,7 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { builderName := "some-builder" cfg := configManager.configWithTrustedBuilders(builderName) - command := cmdConfig.Config(logger, cfg, configPath) + command := cmdConfig.NewConfigCommand(logger, cfg, configPath) command.SetArgs(append(args, builderName)) h.AssertNil(t, command.Execute()) @@ -203,7 +199,7 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { stillTrustedBuilder := "very/safe/builder" cfg := configManager.configWithTrustedBuilders(untrustBuilder, stillTrustedBuilder) - command := cmdConfig.Config(logger, cfg, configPath) + command := cmdConfig.NewConfigCommand(logger, cfg, configPath) command.SetArgs(append(args, untrustBuilder)) h.AssertNil(t, command.Execute()) @@ -221,7 +217,7 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { stillTrustedBuilder := "very/safe/builder" cfg := configManager.configWithTrustedBuilders(stillTrustedBuilder) - command := cmdConfig.Config(logger, cfg, configPath) + command := cmdConfig.NewConfigCommand(logger, cfg, configPath) command.SetArgs(append(args, neverTrustedBuilder)) h.AssertNil(t, command.Execute()) @@ -241,7 +237,7 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { when("builder is a suggested builder", func() { it("does nothing and reports that ", func() { builder := "paketobuildpacks/builder:base" - command := cmdConfig.Config(logger, config.Config{}, configPath) + command := cmdConfig.NewConfigCommand(logger, config.Config{}, configPath) command.SetArgs(append(args, builder)) err := command.Execute() diff --git a/internal/commands/config/untrust_builder.go b/internal/commands/config/untrust_builder.go index 6ebabb9b7a..c8d8162dc2 100644 --- a/internal/commands/config/untrust_builder.go +++ b/internal/commands/config/untrust_builder.go @@ -5,12 +5,11 @@ import ( "github.com/spf13/cobra" "github.com/buildpacks/pack/internal/commands" - "github.com/buildpacks/pack/internal/config" "github.com/buildpacks/pack/logging" ) -// Deprecated: Use `trusted-builder remove` instead +// Deprecated: Use `trusted-builders remove` instead func UntrustBuilder(logger logging.Logger, cfg config.Config) *cobra.Command { cmd := &cobra.Command{ Use: "untrust-builder ", @@ -20,7 +19,7 @@ func UntrustBuilder(logger logging.Logger, cfg config.Config) *cobra.Command { Long: "Stop trusting builder.\n\nWhen building with this builder, all lifecycle phases will be no longer be run in a single container using the builder image.", Example: "pack untrust-builder cnbs/sample-stack-run:bionic", RunE: commands.LogError(logger, func(cmd *cobra.Command, args []string) error { - commands.DeprecationWarning(logger, "untrust-builder", "config trusted-builder remove") + commands.DeprecationWarning(logger, "untrust-builder", "config trusted-builders remove") configPath, err := config.DefaultConfigPath() if err != nil { return errors.Wrap(err, "getting config path") diff --git a/internal/commands/config/untrust_builder_test.go b/internal/commands/config/untrust_builder_test.go index c8657d4f80..af26467a39 100644 --- a/internal/commands/config/untrust_builder_test.go +++ b/internal/commands/config/untrust_builder_test.go @@ -8,12 +8,11 @@ import ( "path/filepath" "testing" - cmdConfig "github.com/buildpacks/pack/internal/commands/config" - "github.com/heroku/color" "github.com/sclevine/spec" "github.com/sclevine/spec/report" + cmdConfig "github.com/buildpacks/pack/internal/commands/config" "github.com/buildpacks/pack/internal/config" ilogging "github.com/buildpacks/pack/internal/logging" "github.com/buildpacks/pack/internal/style"