Skip to content

Commit

Permalink
Add error details for failed container start: Fixes #215
Browse files Browse the repository at this point in the history
  • Loading branch information
johnaohara authored and willr3 committed Jul 9, 2024
1 parent 9da3391 commit e59dbc3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ PrintStream connectShell() {
//TODO how to fail when container start fails
}else{
containerId = shell.shSync(populatedCommand,null,connectTimeoutSeconds);
if(containerId.contains("\n") || containerId.isBlank()){
if(containerId.contains("Error:") || containerId.isBlank()){
//there was an error reported from container runtime
logger.error("error starting {} container {} : {}",getHost().isLocal() ? "local" : "remote", getHost().getSafeString(), containerId);
return null;
} else if(containerId.contains("\n") || containerId.isBlank()){
//assume the container started connected
//cannot shSync because connection is not ready...
rtrn = shell.commandStream;
Expand Down

0 comments on commit e59dbc3

Please sign in to comment.