src/api/get-installations.js
async function addInstallation (installations, name, instPath) {
    var fileExists = await exists(instPath);

    if (fileExists) {
        Object.keys(ALIASES).some(alias => {
            var { nameRe, cmd, macOpenCmdTemplate, path } = ALIASES[alias];

            if (nameRe.test(name)) {
                installations[alias] = { path: path || instPath, cmd, macOpenCmdTemplate };
                return true;
            }

            return false;
        });
    }
}
async function addInstallation (installations, name, instPath) {
    var fileExists = await exists(instPath);

    if (fileExists) {
        Object.keys(ALIASES).some(alias => {
            var { nameRe, cmd, macOpenCmdTemplate, path } = ALIASES[alias];

            if (nameRe.test(name)) {
                installations[alias] = { path: path || instPath, cmd, macOpenCmdTemplate };
                return true;
            }

            return false;
        });
    }
}
async function addInstallation ( installations , name , instPath ) { var fileExists = await exists ( instPath ) ; if ( fileExists ) { Object . keys ( ALIASES ) . some ( alias => { var { nameRe , cmd , macOpenCmdTemplate , path } = ALIASES [ alias ] ; if ( nameRe . test ( name ) ) { installations [ alias ] = { path : path || instPath , cmd , macOpenCmdTemplate } ; return true ; } return false ; } ) ; } }
Find installations for different platforms
Find installations for different platforms