Merge pull request #3 from cachix/fix-segfault

fixes #1
This commit is contained in:
Domen Kožar 2019-10-02 15:45:50 +02:00 committed by GitHub
commit 82911d15ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,6 +11,10 @@ async function run() {
const PATH = process.env.PATH; const PATH = process.env.PATH;
const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt'; const CERTS_PATH = home + '/.nix-profile/etc/ssl/certs/ca-bundle.crt';
// Workaround a segfault: https://github.com/NixOS/nix/issues/2733
await exec.exec("sudo", ["mkdir", "-p", "/etc/nix"]);
await exec.exec("sudo", ["echo", "http2 = false", ">>", "/etc/nix/nix.conf"]);
// TODO: retry due to all the things that go wrong // TODO: retry due to all the things that go wrong
const nixInstall = await tc.downloadTool('https://nixos.org/nix/install'); const nixInstall = await tc.downloadTool('https://nixos.org/nix/install');
await exec.exec("sh", [nixInstall]); await exec.exec("sh", [nixInstall]);