File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/extension/ui/src/utils Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 55import { v1 } from "@docker/extension-api-client-types" ;
66import { ExecResult } from "@docker/extension-api-client-types/dist/v0" ;
77import { encode } from "js-base64" ;
8-
98import { BUSYBOX } from "../Constants" ;
109
1110export const tryRunImageSync = async (
1211 client : v1 . DockerDesktopClient ,
1312 args : string [ ] ,
1413 ignoreError = false
1514) => {
16- const showError = ignoreError ? ( ) => { } : client . desktopUI . toast . error ;
15+ const showError = ignoreError ? ( ) => { } : client . desktopUI . toast . error ;
1716 try {
1817 const result = await client . docker . cli . exec ( "run" , args ) ;
19- if ( result . code !== undefined && result . code != 0 && result . stderr ) {
18+ if ( result . stderr && result . stderr . includes ( "shell operators are not allowed" ) ) {
19+ // This shouldn't happen: it means we have our escaping wrong.
20+ // And there's no way to check that failure other than by looking at stderr's content...
2021 showError ( result . stderr ) ;
2122 }
2223 return result . stdout || "" ;
You can’t perform that action at this time.
0 commit comments