mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 20:13:40 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ecac82c63 |
@@ -0,0 +1 @@
|
||||
Use ASD-STE100 Simplified Technical English for content outside of the code like comments, PR description, PR title, github comments.
|
||||
@@ -177,15 +177,8 @@ func Build(pkgName, outpath string, config *compileopts.Config) error {
|
||||
// Pick a default output path based on the main directory.
|
||||
outpath = filepath.Base(result.MainDir) + config.DefaultBinaryExtension()
|
||||
}
|
||||
} else if fi, statErr := os.Stat(outpath); statErr == nil && fi.IsDir() {
|
||||
var name string
|
||||
if strings.HasSuffix(pkgName, ".go") {
|
||||
name = filepath.Base(pkgName[:len(pkgName)-3]) + config.DefaultBinaryExtension()
|
||||
} else {
|
||||
name = filepath.Base(result.MainDir) + config.DefaultBinaryExtension()
|
||||
}
|
||||
outpath = filepath.Join(outpath, name)
|
||||
}
|
||||
|
||||
if err := os.Rename(result.Binary, outpath); err != nil {
|
||||
// Moving failed. Do a file copy.
|
||||
inf, err := os.Open(result.Binary)
|
||||
|
||||
Reference in New Issue
Block a user