From a5efa48875f63191e2defd4b88dcbbc2a55182ae Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Wed, 17 May 2023 15:00:07 -0400 Subject: [PATCH] Cleanup while I'm here --- lib/tooling/pahole-tool.ts | 4 +--- lib/tooling/readelf-tool.ts | 4 +--- lib/tooling/strings-tool.ts | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/tooling/pahole-tool.ts b/lib/tooling/pahole-tool.ts index c5d931816..7392b1874 100644 --- a/lib/tooling/pahole-tool.ts +++ b/lib/tooling/pahole-tool.ts @@ -33,9 +33,7 @@ export class PaholeTool extends BaseTool { override async runTool(compilationInfo: Record, inputFilepath?: string, args?: string[]) { if (!compilationInfo.filters.binary && !compilationInfo.filters.binaryObject) { - return this.createErrorResponse( - `${this.tool.name ? this.tool.name : 'Pahole'} requires an executable or binary object`, - ); + return this.createErrorResponse(`${this.tool.name ?? 'Pahole'} requires an executable or binary object`); } if (await fs.pathExists(compilationInfo.executableFilename)) { diff --git a/lib/tooling/readelf-tool.ts b/lib/tooling/readelf-tool.ts index 28b301a4a..336966a85 100644 --- a/lib/tooling/readelf-tool.ts +++ b/lib/tooling/readelf-tool.ts @@ -33,9 +33,7 @@ export class ReadElfTool extends BaseTool { override async runTool(compilationInfo: Record, inputFilepath?: string, args?: string[]) { if (!compilationInfo.filters.binary && !compilationInfo.filters.binaryObject) { - return this.createErrorResponse( - `${this.tool.name ? this.tool.name : 'readelf'} requires an executable or binary object`, - ); + return this.createErrorResponse(`${this.tool.name ?? 'readelf'} requires an executable or binary object`); } if (await fileExists(compilationInfo.executableFilename)) { diff --git a/lib/tooling/strings-tool.ts b/lib/tooling/strings-tool.ts index 9d1eed72a..343073605 100644 --- a/lib/tooling/strings-tool.ts +++ b/lib/tooling/strings-tool.ts @@ -33,7 +33,7 @@ export class StringsTool extends BaseTool { override async runTool(compilationInfo: Record, inputFilepath?: string, args?: string[]) { if (!compilationInfo.filters.binary) { - return this.createErrorResponse(`${this.tool.name ? this.tool.name : 'Strings'} requires an executable`); + return this.createErrorResponse(`${this.tool.name ?? 'Strings'} requires an executable`); } if (await fileExists(compilationInfo.executableFilename)) { return super.runTool(compilationInfo, compilationInfo.executableFilename, args);