1
Fork 0
mirror of https://gitea.com/actions/checkout.git synced 2024-11-22 08:35:55 +01:00

Set initial-branch (#427)

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2021-03-23 20:50:37 -04:00 committed by Josh Soref
parent f095bcc56b
commit 401851faf5
2 changed files with 10 additions and 2 deletions

6
dist/index.js vendored
View file

@ -670,7 +670,11 @@ class GitCommandManager {
}
init() {
return __awaiter(this, void 0, void 0, function* () {
yield this.execGit(['init', this.workingDirectory]);
yield this.execGit([
'init',
'--initial-branch=silence_warning_about_default_branch',
this.workingDirectory
]);
});
}
isDetached() {

View file

@ -263,7 +263,11 @@ class GitCommandManager {
}
async init(): Promise<void> {
await this.execGit(['init', this.workingDirectory])
await this.execGit([
'init',
'--initial-branch=silence_warning_about_default_branch',
this.workingDirectory
])
}
async isDetached(): Promise<boolean> {