Improve action log display with control chars (#23820)

Close #23680

Some CLI programs use "\r" and control chars to print new content in
current line.

So, the strings in one line are actually from
`\rReading...1%\rReading...5%\rReading...100%`

This PR tries to make the output better.
This commit is contained in:
wxiaoguang 2023-04-01 20:57:05 +08:00 committed by GitHub
parent 9a30b2eafa
commit aa9c920980
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 92 additions and 3 deletions

View file

@ -2,6 +2,7 @@ import {defineConfig} from 'vitest/dist/config.js';
import {readFile} from 'node:fs/promises';
import {dataToEsm} from '@rollup/pluginutils';
import {extname} from 'node:path';
import vue from '@vitejs/plugin-vue';
function stringPlugin() {
return {
@ -28,5 +29,6 @@ export default defineConfig({
},
plugins: [
stringPlugin(),
vue(),
],
});