зеркало из https://github.com/Azure/autorest.git
Tweak progress bar (#4377)
This commit is contained in:
Родитель
1447f04f75
Коммит
4d8bb54469
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "@autorest/common",
|
||||
"comment": "Render progress bar before closing to force it to 100%",
|
||||
"type": "patch"
|
||||
}
|
||||
],
|
||||
"packageName": "@autorest/common",
|
||||
"email": "tiguerin@microsoft.com"
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "autorest",
|
||||
"comment": "Render progress bar when installing core",
|
||||
"type": "patch"
|
||||
}
|
||||
],
|
||||
"packageName": "autorest",
|
||||
"email": "tiguerin@microsoft.com"
|
||||
}
|
|
@ -329,13 +329,13 @@ export async function selectVersion(
|
|||
|
||||
// @autorest/core install too fast and this doesn't look good right now as Yarn doesn't give info fast enough.
|
||||
// If we migrate to yarn v2 with the api we might be able to get more info and reenable that
|
||||
// const progress = logger.startProgress("installing core...");
|
||||
const progress = logger.startProgress("installing core...");
|
||||
selectedVersion = await (
|
||||
await extensionManager
|
||||
).installPackage(pkg, force, 5 * 60 * 1000, (status) => {
|
||||
// progress.update({ ...status });
|
||||
progress.update({ ...status });
|
||||
});
|
||||
// progress.stop();
|
||||
progress.stop();
|
||||
|
||||
if (args.debug) {
|
||||
console.log(`Extension location: ${selectedVersion.packageJsonPath}`);
|
||||
|
|
|
@ -104,6 +104,7 @@ export class ConsoleLoggerSink implements LoggerSink {
|
|||
const stop = () => {
|
||||
if (bar) {
|
||||
bar.update(bar.getTotal());
|
||||
bar.render();
|
||||
bar.stop();
|
||||
multiBar.remove(bar);
|
||||
this.bars = this.bars.filter((x) => x !== bar);
|
||||
|
|
Загрузка…
Ссылка в новой задаче