node-opcua-pki 6.18.0 → 6.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/pki.mjs CHANGED
@@ -2022,7 +2022,7 @@ async function execute(cmd, cwd) {
2022
2022
  cmd,
2023
2023
  options,
2024
2024
  (err) => {
2025
- const exitCode = err === null ? 0 : err.code || 1;
2025
+ const exitCode = err === null ? 0 : typeof err.code === "number" ? err.code : 1;
2026
2026
  if (err) reject(err);
2027
2027
  else {
2028
2028
  resolve({ exitCode, output });