mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #402] index out of range error #284
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#284
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MVEMCJSUNPE on GitHub (Oct 28, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/402
Act gives index out of range error:

As we can see from the screenshot, the error occurs on
github.com/nektos/act@1e69525fb4/pkg/runner/step_context.go (L381). The code fails to check if NO substring matches were found. If that is the case, then matches is an empty slice, socauses the application to crash.
How to reproduce:
and change .github/workflows/master.yml like mentioned in this issue message parameter 'commandLine' cannot be empty for BOTH linter and tests. Yes, it's not minimal, but the stack trace is pretty large and I'm kind of lazy.
OS: Windows 10 Home 64-bit (Build 10.0, Build 19041)
*Note: act was compiled using MinGW 64, but using go downloaded for windows.
@tadman commented on GitHub (Nov 10, 2020):
I've also seen this. A minimal example to reproduce it:
I found this inadvertently because of a typo:
Where that
-on the second line is hard to spot, but wrecks everything.@github-actions[bot] commented on GitHub (Jan 10, 2021):
Issue is stale and will be closed in 7 days unless there is new activity
interface{}instead ofmap[string]...#1569