You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation says I can set 'group' to either a group name or a GID. If I set a GID, I get a type error because the property type is set to 'String', rather than ['String', 'Integer'].
Steps to Reproduce:
tar_extract tarball do
target_dir '/home/user'
download_dir '/tmp'
user 'user'
group 1001
creates '/home/user/dir/file'
end
Expected Result:
I'd expect the tar ball to be extracted with files owned by user 'user' and group id 1001.
Actual Result:
A type error is shown because the GID is an integer, not a string.
Fix:
I was able to resolve this issue by changing resources/extract.rb:
Change line 29 from:
property :group, String, default: node['root_group']
to:
property :group, [String, Integer], default: node['root_group']
The text was updated successfully, but these errors were encountered:
Cookbook version
2.2.0
Chef-client version
Chef Infra Client: 15.7.32
Platform Details
Fedora release 31 (Thirty One)
Scenario:
The documentation says I can set 'group' to either a group name or a GID. If I set a GID, I get a type error because the property type is set to 'String', rather than ['String', 'Integer'].
Steps to Reproduce:
tar_extract tarball do
target_dir '/home/user'
download_dir '/tmp'
user 'user'
group 1001
creates '/home/user/dir/file'
end
Expected Result:
I'd expect the tar ball to be extracted with files owned by user 'user' and group id 1001.
Actual Result:
A type error is shown because the GID is an integer, not a string.
Fix:
I was able to resolve this issue by changing resources/extract.rb:
Change line 29 from:
property :group, String, default: node['root_group']
to:
property :group, [String, Integer], default: node['root_group']
The text was updated successfully, but these errors were encountered: