Skip to content

Commit

Permalink
Reassure users that the errors reported by git push are non-hazardous.
Browse files Browse the repository at this point in the history
…fixes #20
  • Loading branch information
gseitz committed Sep 8, 2012
1 parent f72d4ef commit 14669d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions notes/0.7.markdown
@@ -0,0 +1 @@
* Print an informational message that `git push` writes to standard error. [#20](https://github.com/sbt/sbt-release/issues/20)
4 changes: 3 additions & 1 deletion src/main/scala/ReleaseExtra.scala
Expand Up @@ -186,9 +186,11 @@ object ReleaseStateTransformations {
private[sbtrelease] lazy val pushChangesAction = { st: State =>
val defaultChoice = extractDefault(st, "y")

if (vcs(st).hasUpstream) {
val vc = vcs(st)
if (vc.hasUpstream) {
defaultChoice orElse SimpleReader.readLine("Push changes to the remote repository (y/n)? [y] ") match {
case Yes() | Some("") =>
if (vc == Git) st.log.info("git push sends it's console output to standard error, which will cause the next few lines to be marked as [error].")
vcs(st).pushChanges !! st.log
case _ => st.log.warn("Remember to push the changes yourself!")
}
Expand Down

0 comments on commit 14669d4

Please sign in to comment.