提交 375b9561 编写于 作者: yanghye's avatar yanghye

energy command-line tools: install

上级 1da259a4
......@@ -189,7 +189,7 @@ func installCEFFramework(c *command.Config) (string, func()) {
// 在线下载框架二进制包
for key, dl := range downloads {
term.Section.Println("Download %s: %s\n", key, dl.url)
term.Section.Println("Download", key, ":", dl.url)
if !dl.isSupport {
term.Logger.Warn("Warn module is not built or configured [" + dl.module + "]")
continue
......
......@@ -36,7 +36,8 @@ func installUPX(c *command.Config) (string, func()) {
upxName += ".exe"
}
targetFileName := filepath.Join(s, upxName) // 保存安装目录
if targetFile, err := os.Create(targetFileName); err == nil {
if targetFile, err := os.OpenFile(targetFileName, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, os.ModePerm); err == nil {
defer targetFile.Close()
term.Section.Println("extract file: ", upxName)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册