add the ability to disable core.autocrlf

This commit is contained in:
Vincent Rischmann 2021-07-12 21:37:39 +02:00
parent 25a956c84d
commit 931cbfe4af
5 changed files with 28 additions and 0 deletions

View file

@ -96,6 +96,13 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
}
core.endGroup()
if (!settings.autocrlf) {
core.startGroup('Disabling autocrlf')
if (!(await git.tryDisableAutocrlf())) {
throw new Error("Unable to disable autocrlf")
}
}
const authHelper = gitAuthHelper.createAuthHelper(git, settings)
try {
// Configure auth