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 1/2] 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) From d7ab887234d58af0fe2587fcb90332285ea09186 Mon Sep 17 00:00:00 2001 From: sammyette Date: Fri, 19 Jul 2024 09:48:01 -0400 Subject: [PATCH 2/2] feat: allow builds for unix (#311) --- .github/workflows/build.yml | 2 +- execfile_unix.go | 2 +- execfile_windows.go | 2 +- init_windows.go | 2 +- job_unix.go | 2 +- job_windows.go | 2 +- pprof.go | 2 +- signal_unix.go | 2 +- signal_windows.go | 2 +- vars_darwin.go | 2 +- vars_linux.go => vars_unix.go | 2 +- vars_windows.go | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) rename vars_linux.go => vars_unix.go (96%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eeab8a2..f1fe1b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: '1.18.8' + go-version: '1.22.2' - name: Download Task run: 'sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d' - name: Build diff --git a/execfile_unix.go b/execfile_unix.go index 44f924a..82c738b 100644 --- a/execfile_unix.go +++ b/execfile_unix.go @@ -1,4 +1,4 @@ -// +build linux darwin +//go:build unix package main diff --git a/execfile_windows.go b/execfile_windows.go index 4b3feef..3d6ef61 100644 --- a/execfile_windows.go +++ b/execfile_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package main diff --git a/init_windows.go b/init_windows.go index 825069d..e76629b 100644 --- a/init_windows.go +++ b/init_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package main diff --git a/job_unix.go b/job_unix.go index 5029012..0a038b1 100644 --- a/job_unix.go +++ b/job_unix.go @@ -1,4 +1,4 @@ -// +build darwin linux +//go:build unix package main diff --git a/job_windows.go b/job_windows.go index 140a5d1..26818b5 100644 --- a/job_windows.go +++ b/job_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package main diff --git a/pprof.go b/pprof.go index 977eeb0..ac4ed55 100644 --- a/pprof.go +++ b/pprof.go @@ -1,4 +1,4 @@ -// +build pprof +//go:build pprof package main diff --git a/signal_unix.go b/signal_unix.go index 2e6c885..1564d93 100644 --- a/signal_unix.go +++ b/signal_unix.go @@ -1,4 +1,4 @@ -// +build darwin linux +//go:build unix package main diff --git a/signal_windows.go b/signal_windows.go index 42a9fff..2ed3370 100644 --- a/signal_windows.go +++ b/signal_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package main diff --git a/vars_darwin.go b/vars_darwin.go index 8ec83ba..43215d5 100644 --- a/vars_darwin.go +++ b/vars_darwin.go @@ -1,4 +1,4 @@ -// +build darwin +//go:build darwin package main diff --git a/vars_linux.go b/vars_unix.go similarity index 96% rename from vars_linux.go rename to vars_unix.go index e1160ba..f90fa55 100644 --- a/vars_linux.go +++ b/vars_unix.go @@ -1,4 +1,4 @@ -// +build linux +//go:build unix && !darwin package main diff --git a/vars_windows.go b/vars_windows.go index d1bd7b6..f724fc2 100644 --- a/vars_windows.go +++ b/vars_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package main