Commit d1c624b2 authored by André's avatar André

powershell: set type of new item

parent fe798d37
......@@ -29,7 +29,7 @@ func (b *PowerShell) writeCommandChecked(w io.Writer, format string, args ...int
func (b *PowerShell) writeCloneCmd(w io.Writer, build *common.Build, dir string) {
b.writeCommand(w, "echo \"Cloning repository...\"")
b.writeCommandChecked(w, "if(Test-Path \"%s\") { Remove-Item -Force -Recurse \"%s\" }", dir, dir)
b.writeCommandChecked(w, "(Test-Path \"%s\") -or (New-Item \"%s\")", dir, dir)
b.writeCommandChecked(w, "(Test-Path \"%s\") -or (New-Item \"%s\" -ItemType \"directory\" )", dir, dir)
b.writeCommandChecked(w, "git clone \"%s\" \"%s\"", build.RepoURL, dir)
b.writeCommandChecked(w, "cd \"%s\"", dir)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment