Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move inspect-builder and inspect-buildpack to relevant subcommands #1071

Merged
merged 6 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Require 1 argument for buildpack inspect, in order to stop segfault
Signed-off-by: David Freilich <dfreilich@vmware.com>
  • Loading branch information
dfreilich committed Mar 5, 2021
commit b7711d180c5d158986f2b7b2ff4a78012ae96eb1
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

21 changes: 11 additions & 10 deletions acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,18 +432,19 @@ func testWithoutSpecificBuilderRequirement(
)
defer imageManager.CleanupImages(packageImageName)

buildpackManager.PrepareBuildpacks(tmpDir, packageImage)
buildpackManager.PrepareBuildpacks(tmpDir, packageImage)

expectedOutput := pack.FixtureManager().TemplateFixture(
"inspect_buildpack_output.txt",
map[string]interface{}{
"buildpack_source": "LOCAL IMAGE",
"buildpack_name": packageImageName,
},
)
expectedOutput := pack.FixtureManager().TemplateFixture(
"inspect_buildpack_output.txt",
map[string]interface{}{
"buildpack_source": "LOCAL IMAGE",
"buildpack_name": packageImageName,
},
)

output := pack.RunSuccessfully("buildpack", "inspect", packageImageName)
assert.TrimmedEq(output, expectedOutput)
output := pack.RunSuccessfully("buildpack", "inspect", packageImageName)
assert.TrimmedEq(output, expectedOutput)
})
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/buildpack_inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func BuildpackInspect(logger logging.Logger, cfg config.Config, client PackClien
var flags BuildpackInspectFlags
cmd := &cobra.Command{
Use: "inspect <image-name>",
Args: cobra.MaximumNArgs(1),
Args: cobra.ExactArgs(1),
Short: "Show information about a buildpack",
Example: "pack buildpack inspect cnbs/sample-package:hello-universe",
RunE: logError(logger, func(cmd *cobra.Command, args []string) error {
Expand Down