mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-25 22:22:51 +09:00
Refactor: Add @otofune's note
https://github.com/syuilo/misskey/pull/75#issue-203103115
This commit is contained in:
parent
2110cbc942
commit
b158af745e
@ -16,6 +16,8 @@ export default class {
|
|||||||
|
|
||||||
show(serviceName: string, command: string, transform: (x: string) => RegExpMatchArray): void {
|
show(serviceName: string, command: string, transform: (x: string) => RegExpMatchArray): void {
|
||||||
try {
|
try {
|
||||||
|
// ステータス0以外のときにexecSyncはstderrをコンソール上に出力してしまうので
|
||||||
|
// プロセスからのstderrをすべて無視するように stdio オプションをセット
|
||||||
const x = execSync(command, { stdio: ['pipe', 'pipe', 'ignore'] });
|
const x = execSync(command, { stdio: ['pipe', 'pipe', 'ignore'] });
|
||||||
const ver = transform(x.toString());
|
const ver = transform(x.toString());
|
||||||
if (ver != null) {
|
if (ver != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user