mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
fix: exec command on Astro new version message (#10991)
`getExecCommand` is an async function but it wasn't awaited in `newVersionAvailable` so the message was: `Run [object Promise] @astrojs/upgrade to update`
This commit is contained in:
parent
e2cdd3c96b
commit
370b9f1612
2 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ export default async function dev(inlineConfig: AstroInlineConfig): Promise<DevS
|
|||
|
||||
logger.warn(
|
||||
'SKIP_FORMAT',
|
||||
msg.newVersionAvailable({
|
||||
await msg.newVersionAvailable({
|
||||
latestVersion: version,
|
||||
})
|
||||
);
|
||||
|
|
|
@ -105,10 +105,10 @@ export function serverShortcuts({ key, label }: { key: string; label: string }):
|
|||
return [dim(' Press'), key, dim('to'), label].join(' ');
|
||||
}
|
||||
|
||||
export function newVersionAvailable({ latestVersion }: { latestVersion: string }) {
|
||||
export async function newVersionAvailable({ latestVersion }: { latestVersion: string }) {
|
||||
const badge = bgYellow(black(` update `));
|
||||
const headline = yellow(`▶ New version of Astro available: ${latestVersion}`);
|
||||
const execCommand = getExecCommand();
|
||||
const execCommand = await getExecCommand();
|
||||
|
||||
const details = ` Run ${cyan(`${execCommand} @astrojs/upgrade`)} to update`;
|
||||
return ['', `${badge} ${headline}`, details, ''].join('\n');
|
||||
|
|
Loading…
Add table
Reference in a new issue