Skip to content

Commit 2bd15cd

Browse files
committed
Add error message for buffer.lua usage
1 parent 56c62cc commit 2bd15cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

example/buffer.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
local vips = require "vips"
66

7+
if #arg ~= 1 then
8+
print("usage: luajit buffer.lua image-file")
9+
error()
10+
end
711
local f = io.open(arg[1], "rb")
812
local content = f:read("*all")
913

0 commit comments

Comments
 (0)