All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] support/dependencies: add suggested regex to sanitize PATH variable
@ 2022-01-25 19:07 Colin Foster
  2022-07-26  9:30 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Foster @ 2022-01-25 19:07 UTC (permalink / raw)
  To: buildroot

WSL typically has /mnt/c/Program Files/... in the PATH variable. The
suggested command will remove anything that has spaces in PATH, which
should probably be good enough for most users who see this error.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
---
 support/dependencies/dependencies.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index c604a9efcc..e49dfb84a5 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -41,7 +41,8 @@ case ":${PATH:-unset}:" in
 (*" "*|*"${TAB}"*|*"${NL}"*)
 	printf "\n"
 	printf "Your PATH contains spaces, TABs, and/or newline (\\\n) characters.\n"
-	printf "This doesn't work. Fix you PATH.\n"
+	printf "This doesn't work. Fix your PATH. You can try running:\n"
+	printf "export PATH=\$(echo \$PATH | grep -Po \"(?::|^)[^\ :]+(?=(?::|$))\" | tr -d '\\\n'; echo)\n"
 	exit 1
 	;;
 esac
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-26  9:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-25 19:07 [Buildroot] [PATCH] support/dependencies: add suggested regex to sanitize PATH variable Colin Foster
2022-07-26  9:30 ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.