File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ type sourceVCSConfig struct {
3737 AutoCommit bool
3838 AutoPush bool
3939 Init interface {}
40+ NotGit bool
4041 Pull interface {}
4142}
4243
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package cmd
33import (
44 "fmt"
55 "os"
6+ "path/filepath"
67 "strings"
78
89 "github.com/coreos/go-semver/semver"
@@ -87,6 +88,19 @@ func init() {
8788 if config .err != nil {
8889 rootCmd .Printf ("warning: %s: %v\n " , config .configFile , config .err )
8990 }
91+ if config .GPGRecipient != "" {
92+ rootCmd .Printf ("" +
93+ "warning: your config file uses gpgRecipient which will be deprecated in v2\n " +
94+ "warning: to disable this warning, set gpg.recipient in your config file instead\n " ,
95+ )
96+ }
97+ if config .SourceVCS .Command != "" && ! config .SourceVCS .NotGit && ! strings .Contains (filepath .Base (config .SourceVCS .Command ), "git" ) {
98+ rootCmd .Printf ("" +
99+ "warning: it looks like you are using a version control system that is not git which will be deprecated in v2\n " +
100+ "warning: please report this at https://github.com/twpayne/chezmoi/issues/459\n " +
101+ "warning: to disable this warning, set sourceVCS.notGit = true in your config file\n " ,
102+ )
103+ }
90104 case os .IsNotExist (err ):
91105 default :
92106 printErrorAndExit (err )
You can’t perform that action at this time.
0 commit comments