aboutsummaryrefslogtreecommitdiff
path: root/bpkg/bpkg.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-21 13:26:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-21 13:26:28 +0200
commit0f9ce1c7022e5fa572886c9a9bda3a7e5c466314 (patch)
tree30a871a1bbf9d0f0e09f3953bf61bea16b540c71 /bpkg/bpkg.cxx
parentc8459c886bab3a68631491059d1a5f300a3861cb (diff)
Implement searching for b in bpkg's exec directory as last resort
This way if we run /opt/build2/bin/bpkg it will be able to find b in /opt/build2/bin/ without PATH.
Diffstat (limited to 'bpkg/bpkg.cxx')
-rw-r--r--bpkg/bpkg.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx
index 561e32e..d6f6924 100644
--- a/bpkg/bpkg.cxx
+++ b/bpkg/bpkg.cxx
@@ -98,6 +98,8 @@ try
{
using namespace cli;
+ exec_dir = path (argv[0]).directory ();
+
argv_file_scanner scan (argc, argv, "--options-file");
// First parse common options and --version/--help.