From 36bd2c5158a55187789e618a3fa939b61b937514 Mon Sep 17 00:00:00 2001 From: Cheryl King Date: Wed, 6 Mar 2024 17:33:52 -0600 Subject: [PATCH] Trim user id before adding to docker run command --- .../java/io/openliberty/tools/common/plugins/util/DevUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java b/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java index 11242d71..296afc9e 100644 --- a/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java +++ b/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java @@ -1837,7 +1837,7 @@ private void addUserId(List commandElements) { String id = runCmd("id -u"); if (id != null) { commandElements.add("--user"); - commandElements.add(id); + commandElements.add(id.trim()); } } catch (IOException e) { // can't get user id. runCmd has printed an error message.