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

cd and ls crash when passed a non-directory link

Đang mở
#1,257 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu trong Cmdline.java tại các điểm vào của cd và ls được xác định bởi các stack trace, sau đó tái hiện cả hai lệnh gọi từ Interpreter với một liên kết hoặc tệp không phải là thư mục. Theo dõi cách từng đường dẫn được xác thực và xác nhận cách xử lý dự kiến đối với các liên kết không phải là thư mục; hoàn tất khi không lệnh nào bị crash và các trường hợp được báo cáo hoạt động nhất quán.

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

Mô tả

bug good first issue
    Uh oh! You've found an error in Core.
    This happened while running your code, so you may be able to find a workaround, but is ultimately an issue in Core.
    The following code caused the error:
    ls('file.zip')
    on or around Interpreter:1.
    Please report this to the developers, and be sure to include the version numbers:
    Server version: SHELL;
    MethodScript version: 3.3.4;
    Loaded extensions and versions:
    Core (3.3.4)
    Here's the stacktrace:
    java.lang.NullPointerException
            at com.laytonsmith.core.functions.Cmdline$ls.exec(Cmdline.java:1699)
            at com.laytonsmith.core.Script.eval(Script.java:409)
            at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:2818)
            at com.laytonsmith.tools.Interpreter$4.run(Interpreter.java:832)
            at java.lang.Thread.run(Thread.java:748)
    
    Uh oh! You've found an error in Core.
    This happened while running your code, so you may be able to find a workaround, but is ultimately an issue in Core.
    The following code caused the error:
    cd('file.zip')
    on or around Interpreter:1.
    Please report this to the developers, and be sure to include the version numbers:
    Server version: SHELL;
    MethodScript version: 3.3.4;
    Loaded extensions and versions:
    Core (3.3.4)
    Here's the stacktrace:
    java.lang.IllegalArgumentException: File provided to SetRootFolder must be a folder, not a file. (.\Downloads\2656-netstat-ipv6.PID.zip was found.)
            at com.laytonsmith.core.environments.GlobalEnv.SetRootFolder(GlobalEnv.java:209)
            at com.laytonsmith.core.functions.Cmdline$cd.exec(Cmdline.java:1648)
            at com.laytonsmith.core.Script.eval(Script.java:409)
            at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:2818)
            at com.laytonsmith.tools.Interpreter$4.run(Interpreter.java:832)
            at java.lang.Thread.run(Thread.java:748)
Ngôn ngữ chính
Java
Star
128
Fork
70
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Mở hướng dẫn đóng góp

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 EngineHub/CommandHelper

Tất cả issue của EngineHub/CommandHelper

Issue tương tự

Thêm issue về Java

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.