Git Product home page Git Product logo

circleci-cli-py's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

circleci-cli-py's Issues

Pre-commit hook does not process args correctly

The pre-commit entrypoint uses the -c CLI flag, expecting that all following args are filepaths. If any args are passed, these are injected directly after the -c flag and are not correctly processed. For example:

  - repo: https://github.com/AleksaC/circleci-cli-py
    rev: v0.1.30549
    hooks:
      - id: circle-ci-validator
        args: [--org-slug, github/Agreena-ApS]

I would expect this to result in one of the following formats:

circleci config validate -c .circleci/config.yml --org-slug github/Agreena-ApS

OR

circleci config validate --org-slug github/Agreena-ApS -c .circleci/config.yml

however, it results in a command like the following:

circleci config validate -c --org-slug github/Agreena-ApS .circleci/config.yml

which gives the error Error: accepts at most 1 arg(s), received 2.

Changing the format to e.g. args: [--org-slug=github/Agreena-ApS] allows the hook to run, but the arg is never actually used, and my checks fail: Error: config compilation contains errors

The following "workaround" format is possible:

  args: ['', --org-slug, github/Agreena-ApS]

as this injects an empty string in the command, resulting in the following:

circleci config validate -c '' --org-slug github/Agreena-ApS .circleci/config.yml

which processes the empty arg (ignoring the fact it does not exist) and uses the positional method arg to get the filepath.

Given that the pre-commit format only allows files to be a single pattern, and the -c flag is not documented in the CircleCI CLI, a solution here would be to drop the -c from the command entry.

circleci: Bad CPU type in executable

Hello ๐Ÿ‘‹

I'm having a weird issue using pre-commit and this validator, and I' not sure if it's a mis-config or something else.

CircleCI Config Validation..................................................Failed
- hook id: circle-ci-validator
- exit code: 126

env: circleci: Bad CPU type in executable

Looking into the exit code: 126 it looks like the executable does not have execution permissions.

But I'm not sure what have changed.

Does anyone have an idea of what could be the root cause?

Thanks.


Here's my config of .pre-commit-config.yaml:

  - repo: https://github.com/AleksaC/circleci-cli-py
    rev: b6ca7f04421b627192e232b22ffc0f33e9571700  # frozen: v0.1.30549
    hooks:
      - id: circle-ci-validator

I'm using the latest released tag v0.1.30549

The same happens with the latest commit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.