fix: astro info command fallback for package manager (#7618)

This commit is contained in:
Emanuele Stoppa 2023-07-10 19:08:18 +01:00 committed by GitHub
parent 255dead86f
commit 3669e2d276
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Add a fallback label if `astro info` command can't determine the package manager used.

View file

@ -112,8 +112,9 @@ async function printInfo({
}
} catch (_e) {}
console.log();
const packageManagerName = packageManager?.name ?? "Couldn't determine.";
printRow('Astro version', `v${ASTRO_VERSION}`);
printRow('Package manager', packageManager?.name);
printRow('Package manager', packageManagerName);
printRow('Platform', platform());
printRow('Architecture', arch());
printRow('Adapter', adapter);