Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Docs] `process.loadEnvFile()` does not document behaviour when variables already exist

Đang mở Phù hợp với người mới
#66,315 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
90/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, node.js
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với phần process.loadEnvFile(path) trong tài liệu API process bị ảnh hưởng và so sánh hành vi của biến môi trường với tài liệu về --env-file. Ghi rõ rằng một giá trị hiện có trong process.env được ưu tiên và không bị tệp .env ghi đè.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

doc
Affected URL(s)

https://nodejs.org/docs/latest/api/process.html#processloadenvfilepath

Description of the problem

The documentation for process.loadEnvFile(path) states that the .env file is loaded into process.env, but does not document what happens when a variable already exists in process.env.

The --env-file documentation states that an existing environment variable takes precedence over a value from the file.

process.loadEnvFile() appears to have the same behaviour, but this is not stated in its API documentation.

Please document the precedence behaviour for process.loadEnvFile(), for example:

If a variable is already defined in process.env, its existing value takes precedence and is not overwritten by the value from the .env file.

Ngôn ngữ chính
JavaScript
Star
122k
Fork
37.4k
Merge trung bình
4 ngày 12 giờ
Pull request đã merge (30 ngày)
296

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nodejs/node

Tất cả issue của nodejs/node

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.