Skip to content

Commit

Permalink
Update the bundle permission to transform itself in executable
Browse files Browse the repository at this point in the history
  • Loading branch information
guiferpa committed Oct 7, 2018
1 parent 6af2ed7 commit 5c280af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const (
// PermDirectory is a alias for permission of bundle directory
PermDirectory = 0777
// PermFile is a alias for permission of bundle file
PermFile = 0644
PermFile = 0755
)

// Build is the func to create the bundle file
Expand All @@ -22,19 +22,19 @@ func Build(name, s string) (int, error) {
return 0, err
}

file, err := os.Create(name)
f, err := os.Create(name)
if err != nil {
return 0, err
}

n, err := file.WriteString(s)
n, err := f.WriteString(s)
if err != nil {
return 0, err
}

if err = file.Chmod(PermFile); err != nil {
if err = f.Chmod(PermFile); err != nil {
return 0, err
}

return n, file.Close()
return n, f.Close()
}

0 comments on commit 5c280af

Please sign in to comment.