0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

[ci] format

This commit is contained in:
matthewp 2023-08-30 14:09:54 +00:00 committed by astrobot-houston
parent 1d2389cb6f
commit f206bde0ff

View file

@ -43,15 +43,19 @@ export async function getPackage<T>(
function tryResolve(packageName: string, cwd: string) { function tryResolve(packageName: string, cwd: string) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
resolvePackage(packageName, { resolvePackage(
basedir: cwd, packageName,
}, (err) => { {
if(err) { basedir: cwd,
reject(err); },
} else { (err) => {
resolve(0); if (err) {
reject(err);
} else {
resolve(0);
}
} }
}); );
}); });
} }