Skip to content

Commit

Permalink
example config fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatsuo committed Jan 18, 2014
1 parent 9ecb310 commit aef6d57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gonew.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
},
"pkg": {
"Inherits": [
"git"
"git",
"newbsd",
"travis"
],
Expand Down
5 changes: 3 additions & 2 deletions gonew_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ func main() {
conf, err := initConfig(opts.config)
checkFatal(err, "config")

// project metadata
projectName := opts.target
packageName := opts.pkg
envName := opts.env
Expand Down Expand Up @@ -265,7 +266,6 @@ func main() {
}

if projConfig.Hooks != nil {
// fmt.Println("PRE")
executeHooks(ts, projTemplEnv, projConfig.Hooks.Pre...)
}

Expand Down Expand Up @@ -304,7 +304,8 @@ func main() {

// fmt.Println("cat", ">", file.path)
// fmt.Println(string(file.content))
handle, err := os.OpenFile(file.path, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0644)
writeMode := os.O_WRONLY|os.O_CREATE|os.O_EXCL // must create
handle, err := os.OpenFile(file.path, writeMode, 0644)
checkFatal(err, file) // TODO clean exit
_, err = handle.Write(file.content)
checkFatal(err, file) // TODO clean exit
Expand Down

0 comments on commit aef6d57

Please sign in to comment.