mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
[ci] format
This commit is contained in:
parent
1d2389cb6f
commit
f206bde0ff
1 changed files with 12 additions and 8 deletions
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue