Skip to content

Commit 192c48b

Browse files
swar8080pedro-stanaka
authored andcommitted
Skip deleting series text temp file because editors like vscode do not block when called through exec.Command, so the file they're editing needs to remain
1 parent 3a1678d commit 192c48b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/cardinality.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,13 @@ func (m *seriesTable) updateWhileBrowsingTable(msg tea.Msg) (tea.Model, tea.Cmd)
279279
cmd.Stdout = os.Stdout
280280
cmd.Stderr = os.Stderr
281281

282-
// Run the editor and clean up
282+
// Run the editor
283283
err := cmd.Run()
284-
os.Remove(tmpFile)
284+
// Ideally the temp file would be removed here but that causes issues with editors like vscode
285285
if err != nil {
286286
return m, m.flashMsg.Flash("Failed to run editor: "+err.Error(), internal.Error, flashDuration)
287287
}
288-
return m, tea.Quit
288+
return m, nil
289289
case "/":
290290
m.searchingMetrics = true
291291
m.searchInput.SetCursor(int(cursor.CursorBlink))

0 commit comments

Comments
 (0)