Skip to content

Remove execute permission from a saved login_item.json #29

@5ouma

Description

@5ouma

✏️ Describe the feature

Now Save(path string, force bool) will create a login_items.json with an execute permission.
But since the file would never be executed, the permission should be removed.

mli/lib/io.go

Lines 8 to 24 in fd914ba

func (loginItems *LoginItems) Save(path string, force bool) error {
if isExist, err := isExist(path); err != nil {
return err
} else if !force && isExist {
return os.ErrExist
}
data, err := json.MarshalIndent(loginItems, "", " ")
if err != nil {
return err
}
if err := os.WriteFile(path, data, os.ModePerm); err != nil {
return err
}
return nil
}

✔︎ Confirm these checks

🗒️ Additional Information

No response

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions