mirror of
https://github.com/actions/checkout.git
synced 2025-12-15 14:59:24 +00:00
.
This commit is contained in:
@@ -172,7 +172,7 @@ class GitCommandManager {
|
||||
async isDetached(): Promise<boolean> {
|
||||
// Note, "branch --show-current" would be simpler but isn't available until Git 2.22
|
||||
const output = await this.execGit(
|
||||
['rev-parse', '--symbolic-full-name', 'HEAD'],
|
||||
['rev-parse', '--symbolic-full-name', '--verify', '--quiet', 'HEAD'],
|
||||
true
|
||||
)
|
||||
return !output.stdout.trim().startsWith('refs/heads/')
|
||||
|
||||
Reference in New Issue
Block a user