Skip to content

Commit

Permalink
fix: permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed May 25, 2024
1 parent 88b9c89 commit 200f55b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions field_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,8 @@ func (t *Text) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case key.Matches(msg, t.keymap.Editor):
ext := strings.TrimPrefix(t.editorExtension, ".")
tmpFile, _ := os.CreateTemp(os.TempDir(), "*."+ext)
//nolint:gosec
cmd := exec.Command(t.editorCmd, append(t.editorArgs, tmpFile.Name())...)

Check failure on line 218 in field_text.go

View workflow job for this annotation

GitHub Actions / lint

G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)
_ = os.WriteFile(tmpFile.Name(), []byte(t.textarea.Value()), os.ModePerm)
_ = os.WriteFile(tmpFile.Name(), []byte(t.textarea.Value()), 0600)

Check failure on line 219 in field_text.go

View workflow job for this annotation

GitHub Actions / lint-soft

Magic number: 0600, in <argument> detected (gomnd)

Check failure on line 219 in field_text.go

View workflow job for this annotation

GitHub Actions / lint-soft

Magic number: 0600, in <argument> detected (gomnd)
cmds = append(cmds, tea.ExecProcess(cmd, func(error) tea.Msg {
content, _ := os.ReadFile(tmpFile.Name())
_ = os.Remove(tmpFile.Name())
Expand Down

0 comments on commit 200f55b

Please sign in to comment.