Comments (3)
Possibly related to changes in #13669 ?
I'm puzzled how false
is being surfaced here when I clearly have the right types for the resource.
from chef.
@brandonfriess-stripe are you still seeing this on newer client versions like 18.3.x, 18.4.x? I ran into a similar TypeError which I believe is caused by the Chef::Mixin::HomebrewUser.find_homebrew_username
. I can see why running under the launchctl/root context might also make a repro occur here.
from chef.
@jazaval I ended up working around it by adding the brew binary path, user, and home dir to the env.
For whatever reason, Chef doesn't expose a property to set the homebrew user or binary path. However...
Deep in the homebrew_update resource they are calling the execute resource and I'm hi-jacking that process to set the ENV to the right things so that this resource will fire correctly under launchd.
Ex:
action :manage do
if node['cpe_homebrew']['auto-update']
# Set PATH for Homebrew auto-update so it works in launchd
ENV['PATH'] = if node.arm64?
"/opt/homebrew/bin:/opt/homebrew/sbin:#{ENV['PATH']}"
else
"/usr/local/bin:/usr/local/sbin:#{ENV['PATH']}"
end
ENV['HOME'] = ::Dir.home(node['cpe_homebrew']['user'])
ENV['USER'] = node['cpe_homebrew']['user']
homebrew_update 'macOS' do
frequency 86_400
action :periodic
ignore_failure true
retries 1
end
end
end
For your case, I wonder if you set the owner
property to the primary user, it would probably work for you.
from chef.
Related Issues (20)
- [Chef 18] chef_client_config breaks with `rights` in the current code base HOT 2
- Start a service after enabling it HOT 3
- Cloud helper functions return incorrect results after nodes are moved between clouds (Azure -> AWS)
- 18.4.2 windows_service property "description": NoMethodError HOT 3
- 'log' resource ignores the 'message' attribute, and will always use the name of the resource as the message
- chef_client_config errors out for bool property
- apt_repository should not use deprecated apt-key anymore HOT 2
- Deprecate osx_profile resource since it can longer silently install profiles HOT 1
- Sysctl resource behaves incorrectly when supplied with comment
- The Supermarket cookbook API limit has changed
- chef-client runs with version 18.x get a EOL warning HOT 7
- homebrew_tap resource always fails with TypeError on x86 HOT 3
- Chef Infra Client 18 is being marked as End Of Life as of May 1, 2024 HOT 3
- Ruby files have known CVEs HOT 1
- Chef client under FIPS mode now broken in RHEL 9.4/Rocky Linux 9.4 HOT 1
- AllowClobber switch is not configurable on powershell_package resource
- Unable to install any versions of Chef except the latest one on Amazon Linux 2023 HOT 1
- FIPS broken for Ruby on Windows with OpenSSL 3.x
- Allow Chef to support a stable Semantic Versioning specification
- WARN: Resource cron_access built into Chef Infra Client is being overridden by the resource from a cookbook. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chef.