fix: coerce python version to semver#1
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1 +/- ##
==========================================
+ Coverage 80.95% 81.81% +0.86%
==========================================
Files 1 1
Lines 21 22 +1
==========================================
+ Hits 17 18 +1
Misses 4 4
Continue to review full report at Codecov.
|
niftylettuce
left a comment
There was a problem hiding this comment.
@radiantly why did you add stdout here? python --version reports to stderr afaik for all versions.
|
we'll also need to make the same PR/change in forwardemail/python-dkim-verify@c5db654 |
|
I copied the format from python-dkim-verify, where the silent flag was set to false when testing. const silent = process.env.NODE_ENV !== 'test';
const options = { silent, async: true };
// ensure python v2.7+ or v3.5+
let version = exec('python --version', { silent });
version = (version.stdout ? version.stdout : version.stderr)
.split(' ')[1]
.trim();What do you think? |
|
ping @niftylettuce see my comment above |
|
Actually, I like |
To fix forwardemail/free-email-forwarding#134