common/scripts/install-run.js
function isPackageAlreadyInstalled(packageInstallFolder) {
    try {
        const flagFilePath = path.join(packageInstallFolder, INSTALLED_FLAG_FILENAME);
        if (!fs.existsSync(flagFilePath)) {
            return false;
        }
        const fileContents = fs.readFileSync(flagFilePath).toString();
        return fileContents.trim() === process.version;
    }
    catch (e) {
        return false;
    }
}
function isPackageAlreadyInstalled(packageInstallFolder) {
    try {
        const flagFilePath = path.join(packageInstallFolder, INSTALLED_FLAG_FILENAME);
        if (!fs.existsSync(flagFilePath)) {
            return false;
        }
        const fileContents = fs.readFileSync(flagFilePath).toString();
        return fileContents.trim() === process.version;
    }
    catch (e) {
        return false;
    }
}
function isPackageAlreadyInstalled ( packageInstallFolder ) { try { const flagFilePath = path . join ( packageInstallFolder , INSTALLED_FLAG_FILENAME ) ; if ( ! fs . existsSync ( flagFilePath ) ) { return false ; } const fileContents = fs . readFileSync ( flagFilePath ) . toString ( ) ; return fileContents . trim ( ) === process . version ; } catch ( e ) { return false ; } }
Detects if the package in the specified directory is installed
Detects if the package in the specified directory is installed