The Configuration section of README.rst lists the options with Python-style values:
[nodeenv]
node = 'latest'
npm = 'latest'
with_npm = False
jobs = '2'
...
make = 'make'
...
mirror = None
Config._load reads the file with ConfigParser.get, which returns the raw string, so the quotes become part of the value. Copied into ~/.nodeenvrc, five of the fifteen lines change the option:
| Line in README |
Value nodeenv gets |
node = 'latest' |
"'latest'" |
npm = 'latest' |
"'latest'" |
jobs = '2' |
"'2'" |
make = 'make' |
"'make'" |
mirror = None |
'None' |
The boolean lines are fine, because getboolean accepts True and False.
Reproduce
On master (e745358):
$ printf "[nodeenv]\nnode = 'latest'\n" > quoted.ini
$ nodeenv -C quoted.ini env
...
ValueError: invalid literal for int() with base 10: "'latest'"
$ printf "[nodeenv]\nmirror = None\n" > mirror.ini
$ nodeenv -C mirror.ini --node=22.11.0 env
* Install prebuilt node (22.11.0) .Error: cannot download https://None/download/release/v22.11.0/node-v22.11.0-darwin-arm64.tar.gz: [Errno 8] nodename nor servname provided, or not known
Where it comes from
The block was added in ac9a510 ("Add ability to configure mirror through setting file"). nodeenv --dump-config-defaults, whose docstring says it prints the defaults for the README, now prints the values without quotes, but it still prints mirror = None.
Possible fix
Regenerate the block from --dump-config-defaults, and leave mirror out of it or show it commented out, since it has no default.
The Configuration section of README.rst lists the options with Python-style values:
Config._loadreads the file withConfigParser.get, which returns the raw string, so the quotes become part of the value. Copied into~/.nodeenvrc, five of the fifteen lines change the option:node = 'latest'"'latest'"npm = 'latest'"'latest'"jobs = '2'"'2'"make = 'make'"'make'"mirror = None'None'The boolean lines are fine, because
getbooleanacceptsTrueandFalse.Reproduce
On master (e745358):
Where it comes from
The block was added in ac9a510 ("Add ability to configure mirror through setting file").
nodeenv --dump-config-defaults, whose docstring says it prints the defaults for the README, now prints the values without quotes, but it still printsmirror = None.Possible fix
Regenerate the block from
--dump-config-defaults, and leavemirrorout of it or show it commented out, since it has no default.