Skip to content

Commit d3db50b

Browse files
Preserve previous default behaviour (JohnSundell#50)
This change restores the default behavior of enabling prompts when using git commands.
1 parent 4668212 commit d3db50b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/ShellOut.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public extension ShellOutCommand {
131131
}
132132

133133
/// Clone a git repository at a given URL
134-
static func gitClone(url: URL, to path: String? = nil, allowingPrompt: Bool = false) -> ShellOutCommand {
134+
static func gitClone(url: URL, to path: String? = nil, allowingPrompt: Bool = true) -> ShellOutCommand {
135135
var command = "\(git(allowingPrompt: allowingPrompt)) clone \(url.absoluteString)"
136136
path.map { command.append(argument: $0) }
137137
command.append(" --quiet")
@@ -140,7 +140,7 @@ public extension ShellOutCommand {
140140
}
141141

142142
/// Create a git commit with a given message (also adds all untracked file to the index)
143-
static func gitCommit(message: String, allowingPrompt: Bool = false) -> ShellOutCommand {
143+
static func gitCommit(message: String, allowingPrompt: Bool = true) -> ShellOutCommand {
144144
var command = "\(git(allowingPrompt: allowingPrompt)) add . && git commit -a -m"
145145
command.append(argument: message)
146146
command.append(" --quiet")
@@ -149,7 +149,7 @@ public extension ShellOutCommand {
149149
}
150150

151151
/// Perform a git push
152-
static func gitPush(remote: String? = nil, branch: String? = nil, allowingPrompt: Bool = false) -> ShellOutCommand {
152+
static func gitPush(remote: String? = nil, branch: String? = nil, allowingPrompt: Bool = true) -> ShellOutCommand {
153153
var command = "\(git(allowingPrompt: allowingPrompt)) push"
154154
remote.map { command.append(argument: $0) }
155155
branch.map { command.append(argument: $0) }
@@ -159,7 +159,7 @@ public extension ShellOutCommand {
159159
}
160160

161161
/// Perform a git pull
162-
static func gitPull(remote: String? = nil, branch: String? = nil, allowingPrompt: Bool = false) -> ShellOutCommand {
162+
static func gitPull(remote: String? = nil, branch: String? = nil, allowingPrompt: Bool = true) -> ShellOutCommand {
163163
var command = "\(git(allowingPrompt: allowingPrompt)) pull"
164164
remote.map { command.append(argument: $0) }
165165
branch.map { command.append(argument: $0) }
@@ -169,7 +169,7 @@ public extension ShellOutCommand {
169169
}
170170

171171
/// Run a git submodule update
172-
static func gitSubmoduleUpdate(initializeIfNeeded: Bool = true, recursive: Bool = true, allowingPrompt: Bool = false) -> ShellOutCommand {
172+
static func gitSubmoduleUpdate(initializeIfNeeded: Bool = true, recursive: Bool = true, allowingPrompt: Bool = true) -> ShellOutCommand {
173173
var command = "\(git(allowingPrompt: allowingPrompt)) submodule update"
174174

175175
if initializeIfNeeded {

0 commit comments

Comments
 (0)