Skip to content

make check fails on macOS:scripts/check-typos syntax error #8930

@utkarsh232005

Description

@utkarsh232005

Problem with this page

Local Development Environment (make check and scripts/check-typos script)

Expected behavior

Running make check or bash scripts/check-typos locally on a macOS machine should execute the typos checks successfully without syntax errors, matching the behavior in CI and Linux environments.

Actual behavior

Running the script on macOS fails immediately with the following bash syntax error, preventing local typos checks from running:

scripts/check-typos: line 14: conditional binary operator expected
make: *** [check] Error 2

This happens because

scripts/check-typos
uses the [[ -v CI ]] syntax, which requires bash 4.2+. The default bash version on macOS is 3.2.57.

Possible solution

Modify line 14 in

scripts/check-typos
to be compatible with older bash versions.

Change: if [[ -v CI ]] ; then

To: if [[ -n "${CI:-}" ]] ; then

Once this is fixed, we could optionally enforce a run of the

typos
binary across the codebase to fix any existing misspellings it finds.

Are you interested in contributing a fix?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Priority

    None yet

    Target date

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions