aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/firecfg/util.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/firecfg/util.c b/src/firecfg/util.c
index f0446ca8d..7ed86c36e 100644
--- a/src/firecfg/util.c
+++ b/src/firecfg/util.c
@@ -58,9 +58,15 @@ int which(const char *program) {
58 // use path2 to count the entries 58 // use path2 to count the entries
59 char *ptr = strtok(path2, ":"); 59 char *ptr = strtok(path2, ":");
60 while (ptr) { 60 while (ptr) {
61 if (find(program, ptr)) { 61 // Ubuntu 18.04 is adding /snap/bin to PATH;
62 free(path2); 62 // they populate /snap/bin with simbolic links to /usr/bin/ programs;
63 return 1; 63 // most simlinked programs are not installed by default.
64 // Removing /snap/bin from our search
65 if (strcmp(ptr, "/snap/bin") != 0) {
66 if (find(program, ptr)) {
67 free(path2);
68 return 1;
69 }
64 } 70 }
65 ptr = strtok(NULL, ":"); 71 ptr = strtok(NULL, ":");
66 } 72 }