public function execute()
    {
        $success = true;
        foreach ($this->env_vars as $key => $value) {
            if (is_numeric($key)) {
                // This allows the developer to specify env vars like " - FOO=bar" or " - FOO: bar"
                $env_var = is_array($value)? key($value).'='.current($value): $value;
            } else {
                // This allows the standard syntax: "FOO: bar"
                $env_var = "$key=$value";
            }

            if (!putenv($this->phpci->interpolate($env_var))) {
                $success = false;
                $this->phpci->logFailure(Lang::get('unable_to_set_env'));
            }
        }
        return $success;
    }
public function execute()
    {
        $success = true;
        foreach ($this->env_vars as $key => $value) {
            if (is_numeric($key)) {
                // This allows the developer to specify env vars like " - FOO=bar" or " - FOO: bar"
                $env_var = is_array($value)? key($value).'='.current($value): $value;
            } else {
                // This allows the standard syntax: "FOO: bar"
                $env_var = "$key=$value";
            }

            if (!putenv($this->phpci->interpolate($env_var))) {
                $success = false;
                $this->phpci->logFailure(Lang::get('unable_to_set_env'));
            }
        }
        return $success;
    }
public function execute ( ) { $ success = true ; foreach ( $ this -> env_vars as $ key => $ value ) { if ( is_numeric ( $ key ) ) { // This allows the developer to specify env vars like " - FOO=bar" or " - FOO: bar" $ env_var = is_array ( $ value ) ? key ( $ value ) . '=' . current ( $ value ) : $ value ; } else { // This allows the standard syntax: "FOO: bar" $ env_var = "$key=$value" ; } if ( ! putenv ( $ this -> phpci -> interpolate ( $ env_var ) ) ) { $ success = false ; $ this -> phpci -> logFailure ( Lang :: get ( 'unable_to_set_env' ) ) ; } } return $ success ; }
Adds the specified environment variables to the builder environment
Adds the specified environment variables to the builder environment