-
-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use splitArgs and splitLines in for-loops #1822
Comments
stawii
added a commit
to stawii/task
that referenced
this issue
Sep 19, 2024
Probably solves go-task#1822
pd93
pushed a commit
that referenced
this issue
Sep 20, 2024
* Update variables.go Probably solves #1822 * add type casting * reorder to look better * add suport for []int functions (until, untilStep)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Both
splitArgs
andsplitLines
functions returns[]string
type, which is not[]any
, causing error:Simple test:
Probably wrapping with ANY (pun intended) list function will do the trick. I've checked with:
and:
both are working and result is as expected:
Please check:
task/variables.go
Line 312 in 58ab26c
task/internal/templater/funcs.go
Line 26 in 58ab26c
task/internal/templater/funcs.go
Line 45 in 58ab26c
I assume changing case stanza from
case []any:
tocase []any, []string:
will solve the issue - but I'm not sure about side effects. EDIT: it doesn't work without type casting, proper code in #1823.The text was updated successfully, but these errors were encountered: