Skip to content

Commit ac9a510

Browse files
committed
Add ability to configure mirror through setting file
1 parent 384ba98 commit ac9a510

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

README.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,17 @@ the keys in that file are the long command-line option names.
242242
These are the available options and their defaults::
243243

244244
[nodeenv]
245-
debug = False
246-
jobs = 2
247-
make = make
248-
node = latest
249-
npm = latest
250-
prebuilt = False
251-
profile = False
245+
node = 'latest'
246+
npm = 'latest'
252247
with_npm = False
248+
jobs = '2'
253249
without_ssl = False
250+
debug = False
251+
profile = False
252+
make = 'make'
253+
prebuilt = True
254+
ignore_ssl_certs = False
255+
mirror = None
254256

255257
Alternatives
256258
------------

nodeenv.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class Config(object):
100100
make = 'make'
101101
prebuilt = True
102102
ignore_ssl_certs = False
103+
mirror = None
103104

104105
@classmethod
105106
def _load(cls, configfiles, verbose=False):
@@ -236,7 +237,7 @@ def make_parser():
236237

237238
parser.add_argument(
238239
'--mirror',
239-
action="store", dest='mirror',
240+
action="store", dest='mirror', default=Config.mirror,
240241
help='Set mirror server of nodejs.org to download from.')
241242

242243
if not is_WIN:

0 commit comments

Comments
 (0)