bin/cpubench: command suggest
This commit is contained in:
@@ -7,6 +7,7 @@ import { spawn } from 'child_process';
|
|||||||
import { promisifySpawn } from '../cli.js';
|
import { promisifySpawn } from '../cli.js';
|
||||||
import yargs from 'yargs';
|
import yargs from 'yargs';
|
||||||
import { hideBin } from 'yargs/helpers';
|
import { hideBin } from 'yargs/helpers';
|
||||||
|
import chalk from 'chalk';
|
||||||
|
|
||||||
// 解析命令行参数
|
// 解析命令行参数
|
||||||
const argv = await yargs(hideBin(process.argv))
|
const argv = await yargs(hideBin(process.argv))
|
||||||
@@ -83,4 +84,8 @@ const proc = spawn(
|
|||||||
proc.stdout.pipe(process.stdout);
|
proc.stdout.pipe(process.stdout);
|
||||||
proc.stderr.pipe(process.stderr);
|
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);
|
await promisifySpawn(proc);
|
||||||
Reference in New Issue
Block a user