From 649f16a44aad6f1c049d4490bbcf37c7d5778e69 Mon Sep 17 00:00:00 2001 From: Luca Di Maio Date: Wed, 29 Dec 2021 20:56:03 +0100 Subject: [PATCH] enter: ensure PATH is built correctly and check for exact subpaths (#66) --- distrobox-enter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distrobox-enter b/distrobox-enter index 4e90ad9f73..c8c1b15ba7 100755 --- a/distrobox-enter +++ b/distrobox-enter @@ -164,7 +164,7 @@ generate_command() { container_paths="${PATH}" # add to the PATH only after the host's paths, and only if not already present. for standard_path in ${standard_paths}; do - if [ -n "${container_paths##*${standard_path}*}" ]; then + if [ -n "${container_paths##*:${standard_path}*}" ]; then container_paths="${container_paths}:${standard_path}" fi done