Skip to content

Commit

Permalink
Ensure the Images page operation works when the docker context is cha…
Browse files Browse the repository at this point in the history
…nged.

Signed-off-by: Eric Promislow <[email protected]>
  • Loading branch information
ericpromislow committed Aug 25, 2023
1 parent d187608 commit b82f284
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/rancher-desktop/backend/images/mobyImageProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export default class MobyImageProcessor extends imageProcessor.ImageProcessor {
protected async runImagesCommand(args: string[], sendNotifications = true): Promise<imageProcessor.childResultType> {
const subcommandName = args[0];

if (this.executor.backend !== 'wsl' && !args.includes('--context')) {
args.unshift('--context', 'rancher-desktop');
}

return await this.processChildOutput(spawn(executable('docker'), args), subcommandName, sendNotifications);
}

Expand Down

0 comments on commit b82f284

Please sign in to comment.