aboutsummaryrefslogtreecommitdiff
path: root/bpkg/checksum.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/checksum.cxx')
-rw-r--r--bpkg/checksum.cxx42
1 files changed, 27 insertions, 15 deletions
diff --git a/bpkg/checksum.cxx b/bpkg/checksum.cxx
index 8940952..fc66ccb 100644
--- a/bpkg/checksum.cxx
+++ b/bpkg/checksum.cxx
@@ -28,12 +28,14 @@ namespace bpkg
//
const char* args[] = {prog.string ().c_str (), "-q", "-s", "", nullptr};
- if (verb >= 3)
- print_process (args);
-
try
{
- process pr (args, 0, -1, 1); // Redirect STDOUT and STDERR to a pipe.
+ process_path pp (process::path_search (args[0]));
+
+ if (verb >= 3)
+ print_process (args);
+
+ process pr (pp, args, 0, -1, 1); // Redirect STDOUT and STDERR to a pipe.
try
{
@@ -74,13 +76,15 @@ namespace bpkg
args.push_back (nullptr);
+ process_path pp (process::path_search (args[0]));
+
if (verb >= 2)
print_process (args);
// Pipe both STDIN and STDOUT. Process exceptions must be handled by
// the caller.
//
- return process (args.data (), -1, -1);
+ return process (pp, args.data (), -1, -1);
}
// sha256sum
@@ -93,12 +97,14 @@ namespace bpkg
//
const char* args[] = {prog.string ().c_str (), "--version", nullptr};
- if (verb >= 3)
- print_process (args);
-
try
{
- process pr (args, 0, -1); // Redirect STDOUT to a pipe.
+ process_path pp (process::path_search (args[0]));
+
+ if (verb >= 3)
+ print_process (args);
+
+ process pr (pp, args, 0, -1); // Redirect STDOUT to a pipe.
try
{
@@ -136,13 +142,15 @@ namespace bpkg
args.push_back (nullptr);
+ process_path pp (process::path_search (args[0]));
+
if (verb >= 2)
print_process (args);
// Pipe both STDIN and STDOUT. Process exceptions must be handled by
// the caller.
//
- return process (args.data (), -1, -1);
+ return process (pp, args.data (), -1, -1);
}
// shasum
@@ -155,12 +163,14 @@ namespace bpkg
//
const char* args[] = {prog.string ().c_str (), "--version", nullptr};
- if (verb >= 3)
- print_process (args);
-
try
{
- process pr (args, 0, -1); // Redirect STDOUT to a pipe.
+ process_path pp (process::path_search (args[0]));
+
+ if (verb >= 3)
+ print_process (args);
+
+ process pr (pp, args, 0, -1); // Redirect STDOUT to a pipe.
try
{
@@ -198,13 +208,15 @@ namespace bpkg
args.push_back (nullptr);
+ process_path pp (process::path_search (args[0]));
+
if (verb >= 2)
print_process (args);
// Pipe both STDIN and STDOUT. Process exceptions must be handled by
// the caller.
//
- return process (args.data (), -1, -1);
+ return process (pp, args.data (), -1, -1);
}
// The dispatcher.