Cleanup while I'm here

This commit is contained in:
Jeremy
2023-05-17 15:00:07 -04:00
parent 2682956a6f
commit a5efa48875
3 changed files with 3 additions and 7 deletions
+1 -3
View File
@@ -33,9 +33,7 @@ export class PaholeTool extends BaseTool {
override async runTool(compilationInfo: Record<any, any>, 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)) {
+1 -3
View File
@@ -33,9 +33,7 @@ export class ReadElfTool extends BaseTool {
override async runTool(compilationInfo: Record<any, any>, 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)) {
+1 -1
View File
@@ -33,7 +33,7 @@ export class StringsTool extends BaseTool {
override async runTool(compilationInfo: Record<any, any>, 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);