question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to configure in git worktree

See original GitHub issue
$ git worktree add ../branch
$ cd ../branch
$ ./gradlew
FAILURE: Build failed with an exception.

* What went wrong:
Could not create task ':installKotlinterPrePushHook'.
> Could not create task of type 'InstallPrePushHookTask'.
   > Not a directory

as https://github.com/jeremymailen/kotlinter-gradle/blob/4f6944a0ca8eba4573467c24c52515b5303d5772/src/main/kotlin/org/jmailen/gradle/kotlinter/tasks/GitHookTasks.kt#L40 tries to mkdirs() immediately upon configuration, but in a git worktree, .git is actually a text file that points to the shared GIT_DIR.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jeremymailencommented, Sep 14, 2020

I see, my apologies for not seeing that detail. Not sure why I didn’t run into that problem testing it. Will investigate and fix.

0reactions
jeremymailencommented, Sep 15, 2020

Ok, actually fixed this time. Release 3.1.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

git worktree is invalid, how to correct this with git commands
The core.worktree setting is documented. If you want to change it using a Git command, use git config core.worktree new-setting .
Read more >
git-worktree Documentation - Git
By default, add refuses to create a new worktree when <commit-ish> is a branch name and is already checked out by another worktree,...
Read more >
Unable to build when using git worktree · Issue #32568 - GitHub
When using a worktree ./.git is not a directory, but a file that lists a directory reference to the primary clone. This command...
Read more >
SonarQube Scanner fails with "Not inside a git worktree" error
config ' is not located under the root directory '/home/travis/build/presque-fini' and will not be analyzed. The SONAR_SCANNER_HOME environment ...
Read more >
git worktree fails only for master branch - Google Groups
I'm working on some server-side software to do a merge. By using git worktree it's possible to check out a given branch for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found