mirror of
https://github.com/kopia/kopia.git
synced 2026-05-24 22:54:55 -04:00
fix(cli): fixing ignoring lines starting with '#' in 'policy edit' (#1830)
Fixes #1821
This commit is contained in:
@@ -75,7 +75,9 @@ func readAndStripComments(fname string) (string, error) {
|
||||
s := bufio.NewScanner(f)
|
||||
for s.Scan() {
|
||||
l := s.Text()
|
||||
l = strings.TrimSpace(strings.Split(l, "#")[0])
|
||||
if strings.HasPrefix(strings.TrimSpace(l), "#") {
|
||||
continue
|
||||
}
|
||||
|
||||
if l != "" {
|
||||
result = append(result, l)
|
||||
|
||||
Reference in New Issue
Block a user