Skip to content

Conversation

@shs96c
Copy link
Member

@shs96c shs96c commented Mar 27, 2025

PR Type

Bug fix, Enhancement


Description

  • Adjusted CARGO_BIN_EXE_selenium-manager path for OS compatibility.

  • Used Bazel select to handle OS-specific paths.


Changes walkthrough 📝

Relevant files
Enhancement
BUILD.bazel
Adjust `selenium-manager` path based on OS in Bazel           

rust/tests/BUILD.bazel

  • Replaced hardcoded CARGO_BIN_EXE_selenium-manager path with
    OS-specific paths.
  • Used Bazel select to differentiate between Windows and default
    conditions.
  • +4/-3     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @qodo-merge-pro
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    @qodo-merge-pro
    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Fix Windows path escaping

    Use double backslashes for Windows paths to properly escape the backslash
    character in string literals. Single backslashes in strings are treated as
    escape characters.

    rust/tests/BUILD.bazel [16-19]

     rustc_env = select({
    -  "//common:windows": {"CARGO_BIN_EXE_selenium-manager": "rust\\selenium-manager"},
    +  "//common:windows": {"CARGO_BIN_EXE_selenium-manager": "rust\\\\selenium-manager"},
       "//conditions:default": {"CARGO_BIN_EXE_selenium-manager": "rust/selenium-manager"},
     }),
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    __

    Why: The suggestion correctly identifies a critical issue with Windows path escaping. In the existing code, a single backslash is used which would be interpreted as an escape character, potentially causing runtime errors. The improved code properly escapes the backslash by using four backslashes (which become two in the string literal).

    High
    • More

    @github-actions github-actions bot added the J-stale Applied to issues that become stale, and eventually closed. label Sep 23, 2025
    @github-actions github-actions bot closed this Oct 7, 2025
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    J-stale Applied to issues that become stale, and eventually closed. Review effort 1/5

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    1 participant