diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1b7163d..661eaa2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,7 @@ concurrency: cancel-in-progress: true env: TARGET: x86_64-unknown-linux-gnu + DEBUG: true jobs: build: name: Build and Test PEM diff --git a/.github/workflows/tests_output.yml b/.github/workflows/tests_output.yml index 3307e28..b4f4340 100644 --- a/.github/workflows/tests_output.yml +++ b/.github/workflows/tests_output.yml @@ -3,6 +3,7 @@ on: workflow_dispatch: env: TARGET: x86_64-unknown-linux-gnu + DEBUG: true jobs: build: name: RuN!!!! diff --git a/lib/debug.js b/lib/debug.js index 21edf1c..8e2b690 100644 --- a/lib/debug.js +++ b/lib/debug.js @@ -1,5 +1,5 @@ function debug (title, content) { - if (process.env.CI === 'true') { + if (process.env.DEBUG === 'true') { console.log(`::group::${title}`) console.log(JSON.stringify(content, null, 3)) console.log('::endgroup::') diff --git a/lib/openssl.js b/lib/openssl.js index ac8e014..ed33816 100644 --- a/lib/openssl.js +++ b/lib/openssl.js @@ -12,7 +12,7 @@ var tempDir = process.env.PEMJS_TMPDIR || osTmpdir() const versionRegEx = new RegExp('^(OpenSSL|LibreSSL) (((\\d+).(\\d+)).(\\d+))([a-z]+)?') -if ("CI" in process.env && process.env.CI === 'true') { +if ("DEBUG" in process.env && process.env.DEBUG === 'true') { if ("LIBRARY" in process.env && "VERSION" in process.env && process.env.LIBRARY != "" && process.env.VERSION != "") { const filePathOpenSSL=`./openssl/${process.env.LIBRARY}_v${process.env.VERSION}/bin/openssl` if (fs.existsSync(filePathOpenSSL)) { diff --git a/test/pem.helper.js b/test/pem.helper.js index 243c519..ab6f8f1 100644 --- a/test/pem.helper.js +++ b/test/pem.helper.js @@ -10,7 +10,7 @@ chai.use(dirtyChai) process.env.PEMJS_TMPDIR = './tmp' debug("ENVs:", process.env) -if ((process.env.TRAVIS === 'true' || process.env.CI === 'true') && "OPENSSL_DIR" in process.env && !("OPENSSL_BIN" in process.env)) { +if ((process.env.TRAVIS === 'true' || process.env.DEBUG === 'true') && "OPENSSL_DIR" in process.env && !("OPENSSL_BIN" in process.env)) { process.env.OPENSSL_BIN = process.env.GITHUB_WORKSPACE+'/openssl/bin/openssl' }