Resolve Linux issue with repeated installs not working

Signed-off-by: Ana Hobden <operator@hoverbear.org>
This commit is contained in:
Ana Hobden 2022-10-27 08:41:58 -07:00
parent 92f6a4e2b7
commit d71827515a

View file

@ -97,6 +97,8 @@ impl Action for SetupDefaultProfile {
Command::new(nix_pkg.join("bin/nix-env"))
.arg("-i")
.arg(&nix_pkg)
.arg("-i")
.arg(&nss_ca_cert_pkg)
.env(
"HOME",
dirs::home_dir().ok_or_else(|| SetupDefaultProfileError::NoRootHome.boxed())?,
@ -110,17 +112,17 @@ impl Action for SetupDefaultProfile {
.map_err(|e| SetupDefaultProfileError::Command(e).boxed())?;
// Install `nss-cacert` into the store
execute_command(
Command::new(nix_pkg.join("bin/nix-env"))
.arg("-i")
.arg(&nss_ca_cert_pkg)
.env(
"NIX_SSL_CERT_FILE",
nss_ca_cert_pkg.join("etc/ssl/certs/ca-bundle.crt"),
),
)
.await
.map_err(|e| SetupDefaultProfileError::Command(e).boxed())?;
// execute_command(
// Command::new(nix_pkg.join("bin/nix-env"))
// .arg("-i")
// .arg(&nss_ca_cert_pkg)
// .env(
// "NIX_SSL_CERT_FILE",
// nss_ca_cert_pkg.join("etc/ssl/certs/ca-bundle.crt"),
// ),
// )
// .await
// .map_err(|e| SetupDefaultProfileError::Command(e).boxed())?;
set_env(
"NIX_SSL_CERT_FILE",