-
Notifications
You must be signed in to change notification settings - Fork 120
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
Don't touch my licence #39
Comments
Hi @jtagcat - thanks for opening an issue. Can you provide a few commands and user flow to reproduce the issue? Thanks much! |
$ go get -u github.com/spf13/cobra
$ go version
go version go1.17.5 linux/amd64
$ ls ~/.cobra.yaml
"/home/jc/.cobra.yaml": No such file or directory (os error 2)
$ cd $(mktemp -d)
$ go mod init x
go: creating new go.mod: module x
$ cp /f/git/jc/git-id/LICENSE .
$ head -n2 LICENSE
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
$ cobra init
Your Cobra application is ready at
/tmp/tmp.m6R0lXbzOa
$ cat LICENSE # empty |
Additionally, it'd be nice if I could opt-out of the in-each-file header, if that's ok. |
Hmmm I see. So given an existing project with an existing licenses, you don't want cobra to overwrite the license. I think that seems reasonable and we can definitely do that with a flag. And for opting out of the in-file headers, I think we could also have a flag that does that. |
I would like to work on this issue. Can you please assign this to me? |
The Cobra project currently lacks enough contributors to adequately respond to all issues. This bot triages issues and PRs according to the following rules:
|
ah, the notification abuse bot has arrived!! /enthusiastic |
The Cobra project currently lacks enough contributors to adequately respond to all issues. This bot triages issues and PRs according to the following rules:
|
Hi all - I've transferred this issue here to This is still relevant, so re-opening. PR welcome! |
Shouldn't the default behavior to warn user if an existing |
@laureanray The PR in place, lists down the current licenses and warns / reconfirms from the user before overwriting the license. Line 116 in 6ed77f4
|
Sorry didn't see the PR. Great job. Looking forward for it to be merged. |
This issue is being marked as stale due to a long period of inactivity |
This issue is being marked as stale due to a long period of inactivity |
Hello 👋 |
This issue is being marked as stale due to a long period of inactivity |
This issue is being marked as stale due to a long period of inactivity |
This PR is long-awaited to be merged. #4 |
This license thing is so annoying. Please merge this PR already. |
Why hasn't this been merged yet? "Don't overwrite my license file" and "Don't add nonsensical license headers if the relevant flags aren't supplied" seem like sane defaults. It's very frustrating trying to use this tool and having to manually remove the file headers constantly. Also, genuine question, why does
This seems like a negative thing. If the flags aren't supplied, nothing should be generated. Adding headers like this is just extra work for devs to clean up. Is this an intentional design decision? |
It'd be neat if cobra didn't touch an already existing LICENCE file. I have to revert changes every time I use cobra.
The text was updated successfully, but these errors were encountered: