Skip to content

Commit

Permalink
Merge pull request #307 from ohrely/mirrorconf
Browse files Browse the repository at this point in the history
Add ability to configure mirror through setting file
  • Loading branch information
ekalinin authored Jun 18, 2022
2 parents 384ba98 + ac9a510 commit ab4f34f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 9 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,17 @@ the keys in that file are the long command-line option names.
These are the available options and their defaults::

[nodeenv]
debug = False
jobs = 2
make = make
node = latest
npm = latest
prebuilt = False
profile = False
node = 'latest'
npm = 'latest'
with_npm = False
jobs = '2'
without_ssl = False
debug = False
profile = False
make = 'make'
prebuilt = True
ignore_ssl_certs = False
mirror = None

Alternatives
------------
Expand Down
3 changes: 2 additions & 1 deletion nodeenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class Config(object):
make = 'make'
prebuilt = True
ignore_ssl_certs = False
mirror = None

@classmethod
def _load(cls, configfiles, verbose=False):
Expand Down Expand Up @@ -236,7 +237,7 @@ def make_parser():

parser.add_argument(
'--mirror',
action="store", dest='mirror',
action="store", dest='mirror', default=Config.mirror,
help='Set mirror server of nodejs.org to download from.')

if not is_WIN:
Expand Down

0 comments on commit ab4f34f

Please sign in to comment.