From b24fc4a422285da3690e6fcb83c3b9043f0a02f0 Mon Sep 17 00:00:00 2001 From: youkwhd <74759624+youkwhd@users.noreply.github.com> Date: Wed, 10 Jul 2024 21:04:15 +0700 Subject: [PATCH] fix: check if no command passed to exec (#310) * fix: check if no command passed to exec * docs: add exec fixes * chore: remove extra space --- CHANGELOG.md | 1 + nature/commands/exec.lua | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6eeed8..c4db0c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ hilbish.run('wc -l', { ### Fixed - Fix ansi attributes causing issues with text when cut off in greenhouse +- `exec` command should return if no arg presented ## [2.2.3] - 2024-04-27 ### Fixed diff --git a/nature/commands/exec.lua b/nature/commands/exec.lua index d279e31..61ef923 100644 --- a/nature/commands/exec.lua +++ b/nature/commands/exec.lua @@ -1,5 +1,8 @@ local commander = require 'commander' commander.register('exec', function(args) + if #args == 0 then + return + end hilbish.exec(args[1]) end)