mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
Fix relative load path for pg.js
This commit is contained in:
parent
cc20d98cb0
commit
48687fc182
7
index.js
7
index.js
@ -8,9 +8,10 @@ try {
|
||||
pgdir = path.dirname(require.resolve('pg'))
|
||||
} catch (e) {
|
||||
pgdir = path.dirname(require.resolve('pg.js'))
|
||||
}
|
||||
if(!pgdir) {
|
||||
throw new Error("Please install either `pg` or `pg.js` to use this module")
|
||||
if(!pgdir) {
|
||||
throw new Error("Please install either `pg` or `pg.js` to use this module")
|
||||
}
|
||||
pgdir = path.join(pgdir, 'lib')
|
||||
}
|
||||
var Result = require(path.join(pgdir, 'result'))
|
||||
var utils = require(path.join(pgdir, 'utils'))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user