diff options
| author | hachem <im@hachem.wtf> | 2026-10-09 11:08:09 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-10-09 11:08:09 +0200 |
| commit | e0572c37d970d601c17085bdb082cc6ef4356891 (patch) | |
| tree | f0b4d71c92978e74d127d7090d3e11380378a8b3 /gils/touch.rv | |
| parent | 8cb66100fe802c38d180ea29a11a902decf0fd8b (diff) | |
chore: fmt some revo code based on lung's example
Diffstat (limited to 'gils/touch.rv')
| -rw-r--r-- | gils/touch.rv | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gils/touch.rv b/gils/touch.rv index f8e3e18..3032e96 100644 --- a/gils/touch.rv +++ b/gils/touch.rv @@ -1,9 +1,13 @@ # dont touch my nono square const context = env.ctx -if context.argv:len() < 2 do fail("usage: touch <path>\n") end -else do +if context.argv:len() < 2 do + fail("usage: touch <path>\n") +end else do const path = expand_path(context.argv[1]) - if fs:is_dir(path) do fail("touch: #{path}: is a directory\n") end - else if fs:size(path) < 0 do fs:store(path, "") end + if fs:is_dir(path) do + fail("touch: #{path}: is a directory\n") + end else if fs:size(path) < 0 do + fs:store(path, "") + end end |
