Interface: ExecResult
Interface: ExecResult
Docker Desktop 확장 SDK의 ExecResult 인터페이스예요. 명령 실행 결과(stdout/stderr)를 담고, 출력 형식에 따라 쉽게 파싱하는 메서드를 제공해요.
출처: 문서
본문
Interface: ExecResult
Since
0.2.0
Hierarchy
RawExecResultRawExecResult)
↳ ExecResult
메서드
lines
▸ lines(): string[]
Split output lines.
반환값
string[]
The list of lines.
parseJsonLines
▸ parseJsonLines(): any[]
Parse each output line as a JSON object.
반환값
any[]
The list of lines where each line is a JSON object.
parseJsonObject
▸ parseJsonObject(): any
Parse a well-formed JSON output.
반환값
any
The JSON object.
속성
cmd
• Optional Readonly cmd: string
Inherited from
RawExecResultRawExecResult).cmdcmd)
killed
• Optional Readonly killed: boolean
Inherited from
RawExecResultRawExecResult).killedkilled)
signal
• Optional Readonly signal: string
Inherited from
RawExecResultRawExecResult).signalsignal)
code
• Optional Readonly code: number
Inherited from
RawExecResultRawExecResult).codecode)
stdout
• Readonly stdout: string
Inherited from
RawExecResultRawExecResult).stdoutstdout)
stderr
• Readonly stderr: string
Inherited from
RawExecResultRawExecResult).stderrstderr)