Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fix for BSD stat #502

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tadukurow
Copy link

Current implementation assumes GNU coreutils version of stat, which fails on BSD.
Try BSD format if GNU coreutils version fails.

fixes #501

@chef-supermarket
Copy link

Hi. I am an automated pull request bot named Curry. There are commits in this pull request whose authors are not yet authorized to contribute to Chef Software, Inc. projects or are using a non-GitHub verified email address. To become authorized to contribute, you will need to sign the Contributor License Agreement (CLA) as an individual or on behalf of your company. You can read more on Chef's blog.

Non-GitHub Verified Committers

There are 1 commit author(s) whose commits are authored by a non-GitHub verified email address. Chef will have to manually verify that they are authorized to contribute.

Please sign the CLA here.

@tadukurow
Copy link
Author

I've verified the commit author as being me with github

@@ -96,6 +99,9 @@ def set_attributes(action_handler, path, attributes)
# Get file attributes { :mode, :owner, :group }
def get_attributes(path)
result = transport.execute("stat -c '%a %U %G %n' #{path}", :read_only => true)
unless result.exitstatus == 0
result = transport.execute("stat -f '%OLp %Sg %Su %N' #{path}", :read_only => true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double space stat -f and switch positions of %Sg %Su => %Su %Sg to be consistent with %U %G

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

FreeBSD 10.2 fails on stat -c
3 participants