Skip to content
Snippets Groups Projects
Commit 907cfa5e authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Fix error level checking for Windows Batch and PowerShell

parent 014aa8c2
No related branches found
No related tags found
No related merge requests found
v 1.0.5
- Fix error level checking for Windows Batch and PowerShell
v 1.0.4
- Fix support for Windows PowerShell
......
1.0.4
1.0.5
......@@ -15,6 +15,7 @@ type ShellWriter interface {
Variable(variable common.BuildVariable)
Command(command string, arguments ...string)
Line(text string)
CheckForErrors()
IfDirectory(path string)
IfFile(file string)
......@@ -148,6 +149,7 @@ func (b *AbstractShell) GenerateCommands(w ShellWriter, info common.ShellScriptI
}
}
w.Line(command)
w.CheckForErrors()
}
}
......
......@@ -29,6 +29,9 @@ func (b *BashWriter) Line(text string) {
b.WriteString(strings.Repeat(" ", b.indent) + text + "\n")
}
func (b *BashWriter) CheckForErrors() {
}
func (b *BashWriter) Indent() {
b.indent++
}
......
......@@ -52,6 +52,10 @@ func (b *CmdWriter) Line(text string) {
b.WriteString(strings.Repeat(" ", b.indent) + text + "\r\n")
}
func (b *CmdWriter) CheckForErrors() {
b.checkErrorLevel()
}
func (b *CmdWriter) Indent() {
b.indent++
}
......
......@@ -47,6 +47,10 @@ func (b *PsWriter) Line(text string) {
b.WriteString(strings.Repeat(" ", b.indent) + text + "\r\n")
}
func (b *PsWriter) CheckForErrors() {
b.checkErrorLevel()
}
func (b *PsWriter) Indent() {
b.indent++
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment