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

Don't touch my licence #39

Open
jtagcat opened this issue Feb 7, 2022 · 19 comments · May be fixed by #60
Open

Don't touch my licence #39

jtagcat opened this issue Feb 7, 2022 · 19 comments · May be fixed by #60
Assignees

Comments

@jtagcat
Copy link

jtagcat commented Feb 7, 2022

It'd be neat if cobra didn't touch an already existing LICENCE file. I have to revert changes every time I use cobra.

@jpmcb
Copy link
Collaborator

jpmcb commented Feb 8, 2022

Hi @jtagcat - thanks for opening an issue.

Can you provide a few commands and user flow to reproduce the issue? Thanks much!

@jtagcat
Copy link
Author

jtagcat commented Feb 11, 2022

$ 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

@jtagcat
Copy link
Author

jtagcat commented Feb 11, 2022

Additionally, it'd be nice if I could opt-out of the in-each-file header, if that's ok.

@jpmcb
Copy link
Collaborator

jpmcb commented Feb 11, 2022

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.

@harjyotbagga
Copy link

I would like to work on this issue. Can you please assign this to me?

@github-actions
Copy link

The Cobra project currently lacks enough contributors to adequately respond to all issues. This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied. - After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied and the issue is closed.
    You can:
  • Make a comment to remove the stale label and show your support. The 60 days reset. - If an issue has lifecycle/rotten and is closed, comment and ask maintainers if they'd be interseted in reopening

@jtagcat
Copy link
Author

jtagcat commented Apr 25, 2022

ah, the notification abuse bot has arrived!! /enthusiastic

@github-actions
Copy link

The Cobra project currently lacks enough contributors to adequately respond to all issues. This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied. - After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied and the issue is closed.
    You can:
  • Make a comment to remove the stale label and show your support. The 60 days reset. - If an issue has lifecycle/rotten and is closed, comment and ask maintainers if they'd be interseted in reopening

@jpmcb
Copy link
Collaborator

jpmcb commented Jul 27, 2022

Hi all - I've transferred this issue here to spf13/cobra-cli since this is specifically about the bootstrapping tool that was moved out of the core spf13/cobra repository.

This is still relevant, so re-opening.

PR welcome!

@jpmcb jpmcb reopened this Jul 27, 2022
@laureanray
Copy link

laureanray commented Aug 9, 2022

Shouldn't the default behavior to warn user if an existing LICENSE file is detected? And suggest to explicitly use a flag to not replace the LICENSE? Otherwise continue replacing the file.

@harjyotbagga
Copy link

@laureanray The PR in place, lists down the current licenses and warns / reconfirms from the user before overwriting the license.

fmt.Print("LICENSE exists. Would you like to overwrite it? [Y/n] ")

@laureanray
Copy link

Sorry didn't see the PR. Great job. Looking forward for it to be merged.

@github-actions
Copy link

github-actions bot commented Oct 9, 2022

This issue is being marked as stale due to a long period of inactivity

@github-actions
Copy link

This issue is being marked as stale due to a long period of inactivity

@andreaangiolillo andreaangiolillo linked a pull request Dec 21, 2022 that will close this issue
@andreaangiolillo
Copy link
Contributor

Hello 👋
My PR is ready for review #60.
Thanks

@github-actions
Copy link

This issue is being marked as stale due to a long period of inactivity

@github-actions
Copy link

This issue is being marked as stale due to a long period of inactivity

@harjyotbagga
Copy link

This PR is long-awaited to be merged. #4
Is any action required?

@tsukinoko-kun
Copy link

This license thing is so annoying. Please merge this PR already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants