Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

README config example breaks when copied into ~/.nodeenvrc

オープン 初心者向け
#422 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
90/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
documentation

調査の方向性

README.rst の Configuration セクションを開き、nodeenv --dump-config-defaults の出力と比較します。Config._load がドキュメントに記載された値をどのように処理するかを確認し、コピーしたオプションがコマンドの出力と一致し、mirror が省略またはコメントアウトされるように例を更新します。README の例で、引用符で囲まれた値や使用できない mirror 設定が導入されなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

docs

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.

主要言語
Python
スター
1.8k
フォーク
224
平均マージ
10時間 15分
マージ済み PR(30日)
22

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ekalinin/nodeenv のほかの issue

ekalinin/nodeenv の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。