未验证 提交 b5ba9093 编写于 作者: M Matt Rickard 提交者: GitHub

Merge pull request #2535 from anfernee/local-rm

Use stdlib to remove a local file
......@@ -49,7 +49,7 @@ type CommandRunner interface {
// Copy is a convenience method that runs a command to copy a file
Copy(assets.CopyableFile) error
//Remove is a convenience method that runs a command to remove a file
// Remove is a convenience method that runs a command to remove a file
Remove(assets.CopyableFile) error
}
......
......@@ -105,6 +105,6 @@ do you have the correct permissions?`,
// Remove removes a file
func (e *ExecRunner) Remove(f assets.CopyableFile) error {
cmd := getDeleteFileCommand(f)
return e.Run(cmd)
targetPath := filepath.Join(f.GetTargetDir(), f.GetTargetName())
return os.Remove(targetPath)
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册