/// ffx constructs a std::process::Command with the given arguments set to be passed to the ffx binary.
ffx constructs a std::process::Command with the given arguments set to be passed to the ffx binary.
ffx constructs a std :: process :: Command with the given arguments set to be passed to the ffx binary .
pub fn ffx(&self, args: &[&str]) -> std::process::Command {
        let mut ffx_path = env::current_exe().expect("could not determine own path");
        // when we daemonize, our path will change to /, so get the canonical path before that occurs.
        ffx_path = std::fs::canonicalize(ffx_path).expect("could not canonicalize own path");
        let mut cmd = Command::new(ffx_path);
        cmd.args(args);
        cmd.env_clear();
        // Pass along all temp related variables, so as to avoid anything
        // falling back to writing into /tmp. In our CI environment /tmp is
        // extremely limited, whereas invocations of tests are provided
        // dedicated temporary areas.
        for (var, val) in std::env::vars() {
            if var.contains("TEMP") || var.contains("TMP") {
                cmd.env(var, val);
            }
        }
        cmd.env("HOME", &*self.home_dir);
        cmd.env("XDG_CONFIG_HOME", &*self.xdg_config_home);
        cmd.env("ASCENDD", &*self.ascendd_path);
        cmd
    }
pub fn ffx ( & self , args : & [ & str ] ) -> std :: process :: Command { let mut ffx_path = env :: current_exe ( ) . expect ( " " ) ; // when we daemonize, our path will change to /, so get the canonical path before that occurs. ffx_path = std :: fs :: canonicalize ( ffx_path ) . expect ( " " ) ; let mut cmd = Command :: new ( ffx_path ) ; cmd . args ( args ) ; cmd . env_clear ( ) ; // Pass along all temp related variables, so as to avoid anything // falling back to writing into /tmp. In our CI environment /tmp is // extremely limited, whereas invocations of tests are provided // dedicated temporary areas. for ( var , val ) in std :: env :: vars ( ) { if var . contains ( " " ) || var . contains ( " " ) { cmd . env ( var , val ) ; } } cmd . env ( " " , & * self . home_dir ) ; cmd . env ( " " , & * self . xdg_config_home ) ; cmd . env ( " " , & * self . ascendd_path ) ; cmd }
ffx constructs a std::process::Command with the given arguments set to be passed to the ffx binary.
ffx constructs a std :: process :: Command with the given arguments set to be passed to the ffx binary .
&self
args
&[&str]