diff --git a/lib/internal/print_help.js b/lib/internal/print_help.js index 9081a09e4fb027..5d2c1daa075e0d 100644 --- a/lib/internal/print_help.js +++ b/lib/internal/print_help.js @@ -1,6 +1,7 @@ 'use strict'; const { types } = internalBinding('options'); +const hasCrypto = Boolean(process.versions.openssl); const typeLookup = []; for (const key of Object.keys(types)) @@ -33,11 +34,6 @@ const envVars = new Map([ 'certificate validation' }], ['NODE_V8_COVERAGE', { helpText: 'directory to output v8 coverage JSON ' + 'to' }], - ['OPENSSL_CONF', { helpText: 'load OpenSSL configuration from file' }], - ['SSL_CERT_DIR', { helpText: 'sets OpenSSL\'s directory of trusted ' + - 'certificates when used in conjunction with --use-openssl-ca' }], - ['SSL_CERT_FILE', { helpText: 'sets OpenSSL\'s trusted certificate file ' + - 'when used in conjunction with --use-openssl-ca' }], ['UV_THREADPOOL_SIZE', { helpText: 'sets the number of threads used in ' + 'libuv\'s threadpool' }] ].concat(hasIntl ? [ @@ -46,6 +42,12 @@ const envVars = new Map([ ] : []).concat(hasNodeOptions ? [ ['NODE_OPTIONS', { helpText: 'set CLI options in the environment via a ' + 'space-separated list' }] +] : []).concat(hasCrypto ? [ + ['OPENSSL_CONF', { helpText: 'load OpenSSL configuration from file' }], + ['SSL_CERT_DIR', { helpText: 'sets OpenSSL\'s directory of trusted ' + + 'certificates when used in conjunction with --use-openssl-ca' }], + ['SSL_CERT_FILE', { helpText: 'sets OpenSSL\'s trusted certificate file ' + + 'when used in conjunction with --use-openssl-ca' }], ] : []));