diff options
| author | Jeff Carr <[email protected]> | 2024-11-20 23:51:28 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-20 23:51:28 -0600 |
| commit | e8a356fcc2a139970302996336d2f19d28e8ab2a (patch) | |
| tree | 0f795e8b6698b99cf720dbda366df7d83598e093 /config.go | |
| parent | ce06800c41750f901c43cb35bcf9df8863dc3686 (diff) | |
ReadOnly() support for wit-package
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -139,6 +139,16 @@ func configWrite(filename string, data []byte) error { log.Warn("open config file :", err) return err } + if filename == "forge.text" { + // add header + cfgfile.Write([]byte("# this file is automatically re-generated from forge.pb, however,\n")) + cfgfile.Write([]byte("# if you want to edit it by hand, you can:\n")) + cfgfile.Write([]byte("# stop forge; remove forge.pb; edit forge.text; start forge\n")) + cfgfile.Write([]byte("# this will cause the default behavior to fallback to parsing this file for the config\n")) + cfgfile.Write([]byte("\n")) + cfgfile.Write([]byte("# this file is intended to be used to customize settings on what\n")) + cfgfile.Write([]byte("# git repos you have write access to. That is, where you can run 'git push'\n")) + } cfgfile.Write(data) return nil } |
