Skip to content

Commit 8a7304d

Browse files
committed
feat: add GitHub CLI shell helper
1 parent ecb03ff commit 8a7304d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import CommonProcess
2+
import Foundation
3+
4+
extension CommonShell {
5+
/// Convenience for creating a shell bound to the GitHub CLI.
6+
public static func gitHubCLI(
7+
workingDirectory: String = FileManager.default.currentDirectoryPath,
8+
hostKind: ExecutionHostKind? = .env(options: [])
9+
) -> CommonShell {
10+
CommonShell(workingDirectory: workingDirectory, executable: .name("gh"), hostKind: hostKind)
11+
}
12+
}

0 commit comments

Comments
 (0)