/// Performs resolution of the distro URL based on the given
/// version and file name
Performs resolution of the distro URL based on the given
version and file name
Performs resolution of the distro URL based on the given version and file name
pub fn resolve(&self, version: &Version, filename: &str) -> Fallible<String> {
        match &self {
            DistroHook::Prefix(prefix) => Ok(format!("{}{}", prefix, filename)),
            DistroHook::Template(template) => Ok(template
                .replace(ARCH_TEMPLATE, NODE_DISTRO_ARCH)
                .replace(OS_TEMPLATE, NODE_DISTRO_OS)
                .replace(VERSION_TEMPLATE, &version.to_string())),
            DistroHook::Bin { bin, base_path } => {
                execute_binary(bin, base_path, Some(version.to_string()))
            }
        }
    }
pub fn resolve ( & self , version : & Version , filename : & str ) -> Fallible < String > { match & self { DistroHook :: Prefix ( prefix ) => Ok ( format ! ( " " prefix filename ) ) , DistroHook :: Template ( template ) => Ok ( template . replace ( ARCH_TEMPLATE , NODE_DISTRO_ARCH ) . replace ( OS_TEMPLATE , NODE_DISTRO_OS ) . replace ( VERSION_TEMPLATE , & version . to_string ( ) ) ) , DistroHook :: Bin { bin , base_path } => { execute_binary ( bin , base_path , Some ( version . to_string ( ) ) ) } } }
Performs resolution of the distro URL based on the given
version and file name
Performs resolution of the distro URL based on the given version and file name
&self
version
&Version
filename
&str