From ce4848cfaaa569da3e11de51f4174eb21709b9b9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 12 Apr 2024 17:09:35 +0200 Subject: Add -s|--timeout-success option to env script builtin The semantics is equivalent to the --success option we already have in the timeout builtin. --- libbuild2/script/parser.hxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libbuild2/script/parser.hxx') diff --git a/libbuild2/script/parser.hxx b/libbuild2/script/parser.hxx index cadf909..795ce4e 100644 --- a/libbuild2/script/parser.hxx +++ b/libbuild2/script/parser.hxx @@ -163,14 +163,15 @@ namespace build2 pre_parse_line_start (token&, token_type&, lexer_mode); // Parse the env pseudo-builtin arguments up to the program name. Return - // the program execution timeout, CWD, the list of the variables that - // should be unset ("name") and/or set ("name=value") in the command - // environment, and the token/type that starts the program name. Note - // that the variable unsets come first, if present. + // the program execution timeout and its success flag, CWD, the list of + // the variables that should be unset ("name") and/or set ("name=value") + // in the command environment, and the token/type that starts the + // program name. Note that the variable unsets come first, if present. // struct parsed_env { optional timeout; + bool timeout_success = false; optional cwd; environment_vars variables; }; -- cgit v1.1