Find evergreen binary using shutil.which() in yamllinters.py

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • Storage Execution 2026-03-30
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The `yamllinters.py` script assumes the `evergreen` binary is located in the `$HOME` directory. If `evergreen` is located in `$PATH` but not `$HOME`, the script fails.

      ```shell
      $ ls $HOME/evergreen
      ls: cannot access '/home/cedric/evergreen': No such file or directory

      $ which evergreen
      /usr/local/bin/evergreen

      $ bazel run lint
      ...
      FileNotFoundError: [Errno 2] No such file or directory: '/home/cedric/evergreen'
      ERROR: Linter run failed, see details above
      ```

      This change updates the script to first check for the binary in `$PATH`, using `$HOME/evergreen` as a fallback.

            Assignee:
            Cedric Sirianni
            Reporter:
            Cedric Sirianni
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: