File tree 3 files changed +4
-3
lines changed
3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ Some additional resources for addons and writing `gyp` files:
170
170
| ` --thin=yes ` | Enable thin static libraries
171
171
| ` --arch=$arch ` | Set target architecture (e.g. ia32)
172
172
| ` --tarball=$path ` | Get headers from a local tarball
173
- | ` --devdir=$path ` | SDK download directory (default is ` ~/.node-gyp ` )
173
+ | ` --devdir=$path ` | SDK download directory (default is OS cache directory )
174
174
| ` --ensure ` | Don't reinstall headers if already present
175
175
| ` --dist-url=$url ` | Download header tarball from custom URL
176
176
| ` --proxy=$url ` | Set HTTP proxy for downloading header tarball
Original file line number Diff line number Diff line change 2
2
3
3
process . title = 'node-gyp'
4
4
5
+ var envPaths = require ( 'env-paths' )
5
6
var gyp = require ( '../' )
6
7
var log = require ( 'npmlog' )
7
8
var os = require ( 'os' )
8
- var path = require ( 'path' )
9
9
10
10
/**
11
11
* Process and execute the selected commands.
@@ -20,7 +20,7 @@ var homeDir = os.homedir()
20
20
if ( prog . devDir ) {
21
21
prog . devDir = prog . devDir . replace ( / ^ ~ / , homeDir )
22
22
} else if ( homeDir ) {
23
- prog . devDir = path . resolve ( homeDir , '. node-gyp')
23
+ prog . devDir = envPaths ( ' node-gyp', { suffix : '' } ) . cache
24
24
} else {
25
25
throw new Error (
26
26
"node-gyp requires that the user's home directory is specified " +
Original file line number Diff line number Diff line change 22
22
"bin" : " ./bin/node-gyp.js" ,
23
23
"main" : " ./lib/node-gyp.js" ,
24
24
"dependencies" : {
25
+ "env-paths" : " ^1.0.0" ,
25
26
"glob" : " ^7.0.3" ,
26
27
"graceful-fs" : " ^4.1.2" ,
27
28
"mkdirp" : " ^0.5.0" ,
You can’t perform that action at this time.
0 commit comments