Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

GitPush.namesOrSpecs() gives NPE #41

Closed
mb720 opened this issue Mar 10, 2014 · 1 comment
Closed

GitPush.namesOrSpecs() gives NPE #41

mb720 opened this issue Mar 10, 2014 · 1 comment

Comments

@mb720
Copy link

mb720 commented Mar 10, 2014

Hi,

When pushing to the remote repo, I want to define the branch to push to.
That's because the branch was set to null according to getNamesOrSpecs().
Turns out, the way I did it causes a NullPointerException:

task pushWithTags(type: GitPush){
    description = "Performs a Git push that includes the tags."
    setPushTags(true)
    namesOrSpecs ("master") // <---- Causes NPE
    credentials{
        username = "mb720"
        if(!project.hasProperty("gitPassword")){
           ext.gitPassword = ""
        }
        password = gitPassword
    }
}

Yet if I change that line to setNamesOrSpecs (["master"]) everything works fine.
Here is the stacktrace: http://pastebin.com/e4MJh2WF
Is this a bug? Am I using it wrong? Just wanted to let you know.

Thanks.

@ajoberstar
Copy link
Owner

Definitely a bug. Just released 0.6.5 to fix it. Let me know if that doesn't work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants