File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1- var query = process . argv [ 2 ]
2- var fs = require ( 'fs' )
31var childProcess = require ( 'child_process' )
2+ var fs = require ( 'fs' )
43
54var SYSTEM_PATHS = [
65 '/lib' ,
@@ -24,7 +23,8 @@ function hasSystemLib (lib) {
2423 // Try using ldconfig on linux systems
2524 if ( hasLdconfig ( ) ) {
2625 try {
27- if ( childProcess . execSync ( 'ldconfig -p 2>/dev/null | grep -E "' + libName + '"' ) . length ) {
26+ if ( childProcess . execSync ( 'ldconfig -p 2>/dev/null | grep -E "' +
27+ libName + '"' ) . length ) {
2828 return true
2929 }
3030 } catch ( err ) {
@@ -69,13 +69,13 @@ function hasLdconfig () {
6969 */
7070function hasFreetype ( ) {
7171 try {
72- if ( childProcess . execSync ( 'pkg-config cairo --cflags-only-I 2>/dev/null | grep freetype2' ) . length ) {
72+ if ( childProcess . execSync ( 'pkg-config cairo --cflags-only-I 2>/dev/null | ' +
73+ 'grep freetype2' ) . length ) {
7374 return true
7475 }
7576 } catch ( err ) {
76- // noop
77+ return false
7778 }
78- return false
7979}
8080
8181/**
@@ -118,4 +118,4 @@ function main (query) {
118118 }
119119}
120120
121- process . stdout . write ( main ( query ) . toString ( ) )
121+ process . stdout . write ( main ( process . argv [ 2 ] ) . toString ( ) )
You can’t perform that action at this time.
0 commit comments