check-installed 2.0.1 → 2.0.2
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/lib/checkEngines.js +5 -3
- package/package.json +1 -1
package/lib/checkEngines.js
CHANGED
|
@@ -8,7 +8,7 @@ const semver = require('semver')
|
|
|
8
8
|
* @returns {Promise<string>} - The version of the engine
|
|
9
9
|
*/
|
|
10
10
|
async function getEngineVersion (name) {
|
|
11
|
-
const spawned = spawn(name, ['--version'])
|
|
11
|
+
const spawned = spawn(name, ['--version'], { shell: true })
|
|
12
12
|
|
|
13
13
|
return new Promise((resolve) => {
|
|
14
14
|
let result = ''
|
|
@@ -17,11 +17,13 @@ async function getEngineVersion (name) {
|
|
|
17
17
|
result += data.toString()
|
|
18
18
|
})
|
|
19
19
|
|
|
20
|
-
spawned.stderr.on('data', () => {
|
|
20
|
+
spawned.stderr.on('data', (data) => {
|
|
21
|
+
console.error(data.toString())
|
|
21
22
|
resolve('none')
|
|
22
23
|
})
|
|
23
24
|
|
|
24
|
-
spawned.on('error', () => {
|
|
25
|
+
spawned.on('error', (error) => {
|
|
26
|
+
console.error(error)
|
|
25
27
|
resolve('none')
|
|
26
28
|
})
|
|
27
29
|
|
package/package.json
CHANGED