Skip to content

Gradlew not found because of outdated path in pre-push hook #269

@xtyrrell

Description

@xtyrrell

When git pushing, with the pre-push hook installed, I got this error:

.git/hooks/pre-push: line 6: /Users/max/workspace/project-2/gradlew: No such file or directory

lintKotlin found problems, running formatKotlin; commit the result and re-push
.git/hooks/pre-push: line 8: /Users/max/workspace/project-2/gradlew: No such file or directory
error: failed to push some refs to 'gitlab.com:exampleorg/examplegroup/project.git'

I looked in the pre-push hook code and it has:

GRADLEW=/Users/max/workspace/project-2/gradlew

The error seems to be because I moved my project to a different directory, so this path is outdated and wrong now.

Hopefully this Google-searchers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions