Skip to content

Commit

Permalink
[save-] warn if no save destination given #2580
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala committed Nov 4, 2024
1 parent 57eddd5 commit cac5a02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions visidata/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ def saveSheets(vd, givenpath, *vsheets, confirm_overwrite=True):
if not vsheets: # blank tuple
vd.warning('no sheets to save')
return
if not givenpath.name:
vd.warning('no save path given')
return

unloaded = [ vs for vs in vsheets if vs.rows is UNLOADED ]
vd.sync(*vd.ensureLoaded(unloaded))

Expand Down

0 comments on commit cac5a02

Please sign in to comment.