diff --git a/Sources/Version-Control/Base/Commands/Branch.swift b/Sources/Version-Control/Base/Commands/Branch.swift index fdcde4a8..ae24ceb3 100644 --- a/Sources/Version-Control/Base/Commands/Branch.swift +++ b/Sources/Version-Control/Base/Commands/Branch.swift @@ -20,7 +20,7 @@ public struct Branch { // swiftlint:disable:this type_body_length /// - Throws: An error if the shell command fails. public func getCurrentBranch(directoryURL: URL) throws -> String { return try ShellClient.live().run( - "cd \(directoryURL.relativePath.escapedWhiteSpaces());git rev-parse --abbrev-ref HEAD" + "cd \(directoryURL.relativePath.escapedWhiteSpaces());git branch --show-current" ).removingNewLines() }