aboutsummaryrefslogtreecommitdiff
path: root/bpkg/utility
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-10-10 06:12:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-10-10 06:12:31 +0200
commit803acc23f8cea3079681e9e624702e104adfd775 (patch)
treef29e26a18a834d1ddcab4789142b371ade47dbbc /bpkg/utility
parent0502b85bacfa8f7735de6f5030b320829e50fb54 (diff)
Implement disfigure step in build command
Diffstat (limited to 'bpkg/utility')
-rw-r--r--bpkg/utility8
1 files changed, 8 insertions, 0 deletions
diff --git a/bpkg/utility b/bpkg/utility
index 5f41843..3e11bc4 100644
--- a/bpkg/utility
+++ b/bpkg/utility
@@ -20,6 +20,14 @@ namespace bpkg
using std::make_shared;
using std::to_string; // To complement bpkg::to_string().
+ // Y/N prompt. The def argument, if specified, should be either 'y'
+ // or 'no'. It is used as the default answer, in case the user just
+ // hits enter. Issue diagnostics and throw failed if no answer could
+ // be extracted from STDOUT (e.g., because it was closed).
+ //
+ bool
+ yn_prompt (const char* prompt, char def = '\0');
+
// Filesystem.
//
bool