@@ -2,7 +2,7 @@ import { Buffer } from 'buffer';
22import { EventEmitter } from 'events' ;
33import timers from 'timers' ;
44
5- import { VMExecutor } from '@pkg/backend/backend' ;
5+ import { VMBackend , VMExecutor } from '@pkg/backend/backend' ;
66import mainEvents from '@pkg/main/mainEvents' ;
77import { ChildProcess , ErrorCommand } from '@pkg/utils/childProcess' ;
88import Logging from '@pkg/utils/logging' ;
@@ -70,7 +70,7 @@ interface ProcessChildOutputOptions {
7070 * an active ImageProcessor can be dropped.
7171 */
7272export abstract class ImageProcessor extends EventEmitter {
73- protected executor : VMExecutor ;
73+ protected backend : VMBackend ;
7474 // Sometimes the `images` subcommand repeatedly fires the same error message.
7575 // Instead of logging it every time, keep track of the current error and give a count instead.
7676 private lastErrorMessage = '' ;
@@ -90,9 +90,9 @@ export abstract class ImageProcessor extends EventEmitter {
9090 // which imageProcessor is currently active, and it can direct events to that.
9191 protected active = false ;
9292
93- protected constructor ( executor : VMExecutor ) {
93+ protected constructor ( backend : VMBackend ) {
9494 super ( ) ;
95- this . executor = executor ;
95+ this . backend = backend ;
9696 this . _refreshImages = this . refreshImages . bind ( this ) ;
9797 this . on ( 'newListener' , ( event : string | symbol ) => {
9898 if ( ! this . active ) {
@@ -195,7 +195,7 @@ export abstract class ImageProcessor extends EventEmitter {
195195 }
196196
197197 return await this . processChildOutput (
198- this . executor . spawn ( { root : true } , ...args ) ,
198+ this . backend . executor . spawn ( { root : true } , ...args ) ,
199199 {
200200 commandName : 'trivy' ,
201201 subcommandName : 'image' ,
0 commit comments