Skip to content

Valid JSON fails to parse #72

Description

@jordaaash

Any ' in the script will cause the JSON parser to fail.

package.json

{
    "pre-push#production": [ "pre-push" ],
    "scripts": {
        "pre-push": "echo \"don't push to production, open a pull request\"; exit 1"
    }
}

shell

git:(production) > git push
running pre-push...failed!
.git/hooks/pre-push: eval: line 235: unexpected EOF while looking for matching `''
.git/hooks/pre-push: eval: line 236: syntax error: unexpected end of file

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions