diff --git a/service/service.go b/service/service.go index dace80f..606cee9 100644 --- a/service/service.go +++ b/service/service.go @@ -145,7 +145,6 @@ type FilePath struct { } // UnmarshalYAML implements the yaml.Unmarshaler interface. -// Mode defaults to 0644 if unspecified in the YAML node. func (lp *FilePath) UnmarshalYAML(node *yaml.Node) error { switch node.Kind { case yaml.ScalarNode: @@ -155,7 +154,7 @@ func (lp *FilePath) UnmarshalYAML(node *yaml.Node) error { return err } lp.Path = path - lp.Mode = 0644 + lp.Mode = 0 default: type noRecursion FilePath var noRec noRecursion diff --git a/service/service_test.go b/service/service_test.go index 3efa777..1217d22 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -117,8 +117,8 @@ links: func TestParseLinksString(t *testing.T) { expect := map[string]service.FilePath{ - "/my/path/file1": {Path: "/tmp/alias1", Mode: 0644}, - "my/path/file2": {Path: "/tmp/alias2", Mode: 0o644}, + "/my/path/file1": {Path: "/tmp/alias1", Mode: 0o000}, + "my/path/file2": {Path: "/tmp/alias2", Mode: 0o000}, } const doc = ` links: @@ -202,8 +202,8 @@ copies: func TestParseCopiesString(t *testing.T) { expect := map[string]service.FilePath{ - "/my/path/file1": {Path: "/tmp/alias1", Mode: 0644}, - "my/path/file2": {Path: "/tmp/alias2", Mode: 0o644}, + "/my/path/file1": {Path: "/tmp/alias1", Mode: 0o000}, + "my/path/file2": {Path: "/tmp/alias2", Mode: 0o000}, } const doc = ` copies: