mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 03:49:45 -06:00
Cleanup while I'm here
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user