You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Ubuntu 18.04, after using addKtlintCheckGitPreCommitHook and trying to commit multiple files, the pre-commit hook fails with a message Task 'path/to/second/File.kt' not found in root project 'ProjectName'.
After some investigation, it turns out this is due to this line in the pre-commit hook:
Because there are no quotes around $CHANGED_FILES, the files after the first one were seen as a separate Gradle task. It can be fixed by adding the quotes:
On Ubuntu 18.04, after using
addKtlintCheckGitPreCommitHook
and trying to commit multiple files, the pre-commit hook fails with a messageTask 'path/to/second/File.kt' not found in root project 'ProjectName'
.After some investigation, it turns out this is due to this line in the pre-commit hook:
Because there are no quotes around
$CHANGED_FILES
, the files after the first one were seen as a separate Gradle task. It can be fixed by adding the quotes:For now we've got a bash script to patch it:
The text was updated successfully, but these errors were encountered: