Skip to content

Commit

Permalink
Error if program already printed
Browse files Browse the repository at this point in the history
  • Loading branch information
ppkn committed Sep 5, 2024
1 parent 35b1f8f commit 6440f84
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions virtual-programs/receipt-printer.folk
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace eval EscPos {
proc printProgram {printer id code} {
if {[file exists "$::env(HOME)/folk-printed-programs/$id.folk"]} {
error "Program $id already exists on disk. Aborting print."
}
writeFolkFile $id $code
writeGeomFile $printer $id

Expand Down

0 comments on commit 6440f84

Please sign in to comment.