Skip to content

Detect codacy-cli-v2 in $PATH #195

Description

@selfagency

You should add this to the top of the codacy.sh generated by the extension.

# Prefer a globally available codacy-cli-v2 from PATH.
if command -v "$bin_name" > /dev/null 2>&1; then
    run_command="$(command -v "$bin_name")"

    if [ "$#" -eq 1 ] && [ "$1" = "download" ]; then
        echo "Codacy cli v2 download succeeded (already available in PATH)"
    else
        "$run_command" "$@"
    fi

    exit $?
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions