Skip to content

Commit

Permalink
gcroot: addressing review comments
Browse files Browse the repository at this point in the history
- replaced fmt.sprintf with filepath.join
- fixed directory permission bits
  • Loading branch information
Johan Thomsen authored and adamtulinius committed May 8, 2019
1 parent 97928f9 commit 76fa9fc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions nix/nix.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,9 @@ func (ctx *NixContext) BuildMachines(deploymentPath string, hosts []Host, nixArg
}
hostsArg += "]"

resultLinkPath :=
fmt.Sprintf("%s/.gcroots/%s",
path.Dir(deploymentPath),
path.Base(deploymentPath))
resultLinkPath := filepath.Join(path.Dir(deploymentPath), ".gcroots", path.Base(deploymentPath))
if ctx.KeepGCRoot {
if err = os.MkdirAll(path.Dir(resultLinkPath), 755) ; err != nil {
if err = os.MkdirAll(path.Dir(resultLinkPath), 0755) ; err != nil {
ctx.KeepGCRoot = false;
fmt.Fprintf(os.Stderr, "Unable to create GC root, skipping: %s", err)
}
Expand Down

0 comments on commit 76fa9fc

Please # to comment.