Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function filterAlreadyInstalledPackages(packages: AbsolutePathPackage[]): Promise {
return filterAsync(packages, async (pkg: AbsolutePathPackage) => {
//If the file is present at the install test path then filter it
let testPath = pkg.installTestPath;
if (!testPath) {
//if there is no testPath specified then we will not filter it
return true;
}
return !(await util.fileExists(testPath.value));
});
}