Skip to content

Commit afb2b0a

Browse files
committed
Merge branch 'TinCanTech-ci-enable-shell-switch-errexit'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2 parents 6dc6b9c + 5141bf0 commit afb2b0a

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

.github/workflows/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
EASYRSA_NIX: 1
2727
TERM: xterm-256color
2828
EASYRSA_SILENT_SSL: 1
29+
EASYRSA_SET_ERREXIT: 1
2930

3031
# Steps represent a sequence of tasks that will be executed as part of the job
3132
steps:
@@ -53,6 +54,7 @@ jobs:
5354
EASYRSA_WIN_QUICK: 1
5455
TERM: xterm-256color
5556
EASYRSA_SILENT_SSL: 1
57+
EASYRSA_SET_ERREXIT: 1
5658

5759
# Steps represent a sequence of tasks that will be executed as part of the job
5860
steps:
@@ -80,6 +82,7 @@ jobs:
8082
EASYRSA_MAC: 1
8183
TERM: xterm-256color
8284
EASYRSA_SILENT_SSL: 1
85+
EASYRSA_SET_ERREXIT: 1
8386

8487
# Steps represent a sequence of tasks that will be executed as part of the job
8588
steps:

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Easy-RSA 3 ChangeLog
22

3+
3.2.6 (TBD)
4+
5+
* CI: Enable shell switch errexit, set by env-var $EASYRSA_SET_ERREXIT (772d6f6) (#1417)
6+
37
3.2.5 (2025-12-13)
48

59
* ssl_cert_digest(): Support Edwards curve with LibreSSL (1eaa31e) (#1415)

doc/EasyRSA-Advanced.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ short description is shown below:
170170
* `EASYRSA_PASSOUT` (CLI: `--passout`) - allows to specify a source for
171171
password using any openssl password options like pass:1234 or env:var
172172
* `EASYRSA_NO_PASS` (CLI: `--nopass`) - disable use of passwords
173-
* `EASYRSA_UMASK` (CLI: `--umask`) - safe umask to use for file creation.
173+
* `EASYRSA_UMASK` (CLI: `--umask`) - safe umask to use for file creation
174174
Defaults to `077`
175175
* `EASYRSA_NO_UMASK` (CLI: `--no-umask`) - disable safe umask. Files will be
176176
created using the system's default
@@ -183,5 +183,6 @@ short description is shown below:
183183
* `EASYRSA_FORCE_SAFE_SSL` (CLI: `--force-safe-ssl`) - expand environment
184184
variables in SSL config
185185
* `EASYRSA_FORCE_VARS` (CLI: `--force-vars`) - ignore known errors in 'vars' file
186+
* `EASYRSA_SET_ERREXIT` - Enable `errexit`, IE. `set -e`, within `easyrsa` script
186187

187188
**NOTE:** the global options must be provided before the commands.

easyrsa3/easyrsa

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,7 @@ and then try running the easyrsa command again."
10801080
fi
10811081

10821082
# if 'cleanup' is called without 'ok' then an error occurred
1083+
print "*** Easy-RSA has encountered a FATAL error, please report this."
10831084
verbose "Exit: Final Fail = true"
10841085
exit 1 # Exit: Final Fail, unknown error
10851086
} # => cleanup()
@@ -1500,8 +1501,8 @@ Your newly created PKI dir is:
15001501

15011502
# Select and show Auto-configured vars file
15021503
unset -v EASYRSA_NO_VARS EASYRSA_VARS_FILE
1503-
select_vars
1504-
if [ "$EASYRSA_VARS_FILE" ]; then
1504+
1505+
if select_vars; then
15051506
information "\
15061507
IMPORTANT: PKI algorithm is $auto_algo${NL}
15071508
Using Easy-RSA Auto-configured 'vars' file:
@@ -6778,6 +6779,11 @@ trap "exit 15" 15
67786779
# Get host details - No configurable input allowed
67796780
detect_host
67806781

6782+
# Allow selective use of 'set -e'
6783+
if [ "$EASYRSA_SET_ERREXIT" ]; then
6784+
set -e || die "Cannot set -e"
6785+
fi
6786+
67816787
# Protect variables from alteration by sourcing vars file
67826788
# undocumented, not designed for use
67836789
[ -z "$EASYRSA_ALIAS_DAYS" ] || \

0 commit comments

Comments
 (0)