Skip to content

Commit 8a7315d

Browse files
authored
exec
Added call to exec to replace the wrapping "sh" with whatever is being run. This will lighten the overhead.
1 parent d5f0cea commit 8a7315d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/jenkinsci/plugins/docker/workflow/WithContainerStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ private static class Decorator extends LauncherDecorator implements Serializable
253253
prefix.add(path);
254254
} else {
255255
String safePath = path.replace("'", "'\"'\"'");
256-
starter.cmds().addAll(0, Arrays.asList("sh", "-c", "cd '" + safePath + "'; \"$@\"", "--"));
256+
starter.cmds().addAll(0, Arrays.asList("sh", "-c", "cd '" + safePath + "'; exec \"$@\"", "--"));
257257
}
258258
}
259259
}

0 commit comments

Comments
 (0)