mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-11-22 00:20:53 +00:00
wait for nix-daemon socket
This commit is contained in:
parent
16107722cd
commit
c9b9c77f3b
2 changed files with 9 additions and 0 deletions
|
@ -62,6 +62,10 @@ function run() {
|
||||||
if (os_1.type() == "Darwin") {
|
if (os_1.type() == "Darwin") {
|
||||||
// macOS needs certificates hints
|
// macOS needs certificates hints
|
||||||
core.exportVariable('NIX_SSL_CERT_FILE', '/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt');
|
core.exportVariable('NIX_SSL_CERT_FILE', '/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt');
|
||||||
|
// TODO: nc doesn't work correctly on macOS :(
|
||||||
|
//await exec.exec("sh", ["-c", "while ! nc -zU /nix/var/nix/daemon-socket/socket; do sleep 0.5; done"]);
|
||||||
|
// macOS needs time to reload the daemon :(
|
||||||
|
yield exec.exec("sleep", ["10"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|
|
@ -52,6 +52,11 @@ async function run() {
|
||||||
if (type() == "Darwin") {
|
if (type() == "Darwin") {
|
||||||
// macOS needs certificates hints
|
// macOS needs certificates hints
|
||||||
core.exportVariable('NIX_SSL_CERT_FILE', '/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt');
|
core.exportVariable('NIX_SSL_CERT_FILE', '/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt');
|
||||||
|
|
||||||
|
// TODO: nc doesn't work correctly on macOS :(
|
||||||
|
//await exec.exec("sh", ["-c", "while ! nc -zU /nix/var/nix/daemon-socket/socket; do sleep 0.5; done"]);
|
||||||
|
// macOS needs time to reload the daemon :(
|
||||||
|
await exec.exec("sleep", ["10"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in a new issue