Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to configure mirror through setting file #307

Merged
merged 1 commit into from
Jun 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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