bin/cpubench: command suggest

This commit is contained in:
2025-01-21 12:14:45 +08:00
parent 729a3d82d5
commit 6db7d522d7

View File

@@ -7,6 +7,7 @@ import { spawn } from 'child_process';
import { promisifySpawn } from '../cli.js';
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import chalk from 'chalk';
// 解析命令行参数
const argv = await yargs(hideBin(process.argv))
@@ -83,4 +84,8 @@ const proc = spawn(
proc.stdout.pipe(process.stdout);
proc.stderr.pipe(process.stderr);
console.log(`Command suggest:`);
console.log(chalk.green(`systemctl --user status ${uuid}`));
console.log(chalk.green(`journalctl --user -xeu ${uuid}`));
await promisifySpawn(proc);