# HG changeset patch
# User Raphaël Gomès <rgomes@octobus.net>
# Date 1636552050 -3600
#      Wed Nov 10 14:47:30 2021 +0100
# Node ID 6f4d65d08ac0636898dbb9e5525e60ab37dc1d7f
# Parent  9c2bef7434c657b8ec06c0150b986995586e351d
Use subprocess::plain in `time` command

diff --git a/src/subcommands/time.rs b/src/subcommands/time.rs
--- a/src/subcommands/time.rs
+++ b/src/subcommands/time.rs
@@ -1,7 +1,7 @@
 use crate::datasets::DatasetsToml;
 use crate::errors::Result;
 use crate::subcommands::fetch::fetch;
-use crate::Megafine;
+use crate::{subprocess, Megafine};
 use dialoguer::console::style;
 use std::fs;
 use std::path::PathBuf;
@@ -40,13 +40,8 @@
         let zstd = zstd::Decoder::new(archive_file)?;
         tar::Archive::new(zstd).unpack(tmp.path())?;
 
-        let mut command = process::Command::new("sh");
-        command
-            .arg("-c")
-            .arg(&args.script)
-            .current_dir(tmp.path())
-            .env("HGRCPATH", "")
-            .env("PAGER", "");
+        let mut command = subprocess::plain("sh");
+        command.arg("-c").arg(&args.script).current_dir(tmp.path());
         print!("Running in {}", style(&dataset.name).bold());
         if args.script_output {
             println!();