From 56bfd9c36f8b40c55656a6fa90852c8c766bac3c Mon Sep 17 00:00:00 2001 From: Dmitry Kozlyuk Date: Fri, 13 Aug 2021 11:25:27 +0300 Subject: [PATCH] Remove hardcoded path to diff binary Like other programs, diff can and should be located using PATH. This fixes compare_dbs() on non-FHS systems, like NixOS. --- apps/cli/cli_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/cli/cli_common.c b/apps/cli/cli_common.c index 4f1c6fdb..41b4802d 100644 --- a/apps/cli/cli_common.c +++ b/apps/cli/cli_common.c @@ -701,7 +701,7 @@ compare_xmls(cxobj *xc1, clicon_err(OE_CFG, errno, "cbuf_new"); goto done; } - cprintf(cb, "/usr/bin/diff -dU 1 %s %s | grep -v @@ | sed 1,2d", + cprintf(cb, "diff -dU 1 %s %s | grep -v @@ | sed 1,2d", filename1, filename2); if (system(cbuf_get(cb)) < 0) goto done;