-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix global services not starting on macOS Sonoma #163
Fix global services not starting on macOS Sonoma #163
Conversation
…der=GPCS Can't set variables_order outside of a php.ini
what's strange though is it works fine for me on MacOS Sonoma, although aws it uses my host aws dash is definitely more standard for cli plugin systems though |
passthru(sprintf('cd %s/bin/ && ln -sf ./ws-aws ./ws.aws', $path)); | ||
passthru(sprintf('cd %s/bin/ && ln -sf ./ws-poweroff ./ws.poweroff', $path)); | ||
passthru(sprintf('cd %s/bin/ && ln -sf ./ws-service ./ws.service', $path)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what would we use the . version for after this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case something in the harnesses use it. I don't think we do though, only ws.aws
.
*/ | ||
private function buildEnv(): array | ||
{ | ||
return getenv(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is apparently, since 8.0, but try
return getenv(); | |
return getenv(null, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it's default null is just not supplied and confused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that locally but phpstan wasn't having it (even latest phpstan version, even with the phpVersion config in phpstan.neon).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry joke incoming
return getenv(); | |
$env = []; | |
foreach (array_keys(getenv()) as $key) { | |
$value = getenv($key, true); | |
if ($value !== false) { | |
$env[$key] = $value; | |
} | |
} | |
return $env; |
at least no http request variables in cli though so nvm
This reverts commit 6a6fbe0.
Related to #163, add some tests surrounding the installation of the home directory global services and the ability to run them on macOS Sonoma.
My gut feeling is that macOS Sonoma does not like files named
something.service
.When calling
ws global service proxy restart
for example, the output is nothing, the exit code is 0, it just does nothing!When experimenting, copying the file to a different name let it execute, however as the code referred to
ws.service
for launching services, we couldn't get things fully working.It may also be the way the home directory folder gets installed, so this may not be the issue.
Let's test this out for people that are having this issue.
Also fixed an issue with #149 on my system where
variables_order=GPCS
instead ofvariables_order=EGPCS
in the system php.ini.