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);