summaryrefslogtreecommitdiffstats
path: root/fish/fish.c
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-04 12:54:47 +0100
committerRichard Jones <rjones@redhat.com>2009-04-04 12:54:47 +0100
commit8358ea9524509c02448fe52d5bea205c9c3f869e (patch)
tree72a1478994d95bb60951319b4b8006851b7e7567 /fish/fish.c
parent017b503c3bf79ad87cd66f73d36b4be5b31d10ad (diff)
downloadlibguestfs-8358ea9524509c02448fe52d5bea205c9c3f869e.tar.gz
libguestfs-8358ea9524509c02448fe52d5bea205c9c3f869e.tar.xz
libguestfs-8358ea9524509c02448fe52d5bea205c9c3f869e.zip
LIBGUESTFS_PATH implementation.
Diffstat (limited to 'fish/fish.c')
-rw-r--r--fish/fish.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fish/fish.c b/fish/fish.c
index 5de84bc9..0fc14ce1 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -117,6 +117,14 @@ main (int argc, char *argv[])
guestfs_set_autosync (g, 1);
+ /* If developing, add . to the path. Note that libtools interferes
+ * with this because uninstalled guestfish is a shell script that runs
+ * the real program with an absolute path. Detect that too.
+ */
+ if (argv[0] &&
+ (argv[0][0] != '/' || strstr (argv[0], "/.libs/lt-") != NULL))
+ guestfs_set_path (g, ".:" GUESTFS_DEFAULT_PATH);
+
for (;;) {
c = getopt_long (argc, argv, options, long_options, NULL);
if (c == -1) break;