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

fix: Avoid panic if target is blank/dir and no packager is specified. #179

Merged
merged 3 commits into from
Aug 4, 2020

Conversation

erikgeiser
Copy link
Member

@erikgeiser erikgeiser commented Jul 25, 2020

In #157 I accidentally introduced a bug that results in a panic if --target is a directory or blank. This pull request fixes this by printing a useful error message instead.

A minor issue: The doPackage() line limit enforced by golangci-lint:funlen is exceeded by 4 lines which in my opinion is acceptable, so i added // nolint:funlen.

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 25, 2020
@vercel
Copy link

vercel bot commented Jul 25, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/goreleaser/nfpm/kkwz8jz5n
✅ Preview: https://nfpm-git-fork-erikgeiser-fix-cmd-error-handling.goreleaser.vercel.app

@vercel vercel bot temporarily deployed to Preview July 25, 2020 16:39 Inactive
@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 30, 2020
@vercel vercel bot temporarily deployed to Preview July 30, 2020 17:18 Inactive
@erikgeiser
Copy link
Member Author

erikgeiser commented Jul 30, 2020

I fixed the messy error definition and rebased.

@vercel vercel bot temporarily deployed to Preview July 30, 2020 17:23 Inactive
@vercel vercel bot temporarily deployed to Preview August 1, 2020 13:49 Inactive
@caarlos0 caarlos0 merged commit 46cd8d9 into goreleaser:master Aug 4, 2020
@caarlos0
Copy link
Member

caarlos0 commented Aug 4, 2020

thanks!

@caarlos0
Copy link
Member

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@goreleaser goreleaser locked as resolved and limited conversation to collaborators Nov 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants