1602 / 1602/compound

Console: change __dirname to expected __dirname

Đang mở Phù hợp với người mới
#643 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
1.6k
Fork
179
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Problem: when running `rw c` or `rw c "script"`, the `__dirname` is `/path/to/project/node_modules/compound/lib/server`.
Expected: `__dirname === /path/to/project`

Current workaround: `var dirname = './'`, since `./` points to the correct local dir.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Look at the console command implementation, likely in a file like `lib/server/console.js` or `lib/compound.js`. Find where `__dirname` is used or where the script execution context is set. The goal is to ensure the working directory for scripts run via `rw c` is the project root. Test by running a script that logs `__dirname`.

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

Đánh giá

Công nghệ
javascript, node.js
Lĩnh vực
cli, tooling
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
65/100

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.