From d2e86c6cbeb80237d6a647fd2b376637aac562a8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 26 Jan 2017 12:12:37 +0900 Subject: [PATCH] Refactor: Add @otofune's note https://github.com/syuilo/misskey/pull/75#issue-203103115 --- src/utils/dependencyInfo.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/dependencyInfo.ts b/src/utils/dependencyInfo.ts index c7c1441ec..8c3014d30 100644 --- a/src/utils/dependencyInfo.ts +++ b/src/utils/dependencyInfo.ts @@ -16,6 +16,8 @@ export default class { show(serviceName: string, command: string, transform: (x: string) => RegExpMatchArray): void { try { + // ステータス0以外のときにexecSyncはstderrをコンソール上に出力してしまうので + // プロセスからのstderrをすべて無視するように stdio オプションをセット const x = execSync(command, { stdio: ['pipe', 'pipe', 'ignore'] }); const ver = transform(x.toString()); if (ver != null) {