Skip to content

executor call crashes because variadic path args do not have .at #738

@NickChristensen

Description

@NickChristensen

I’m seeing executor call crash before it invokes the tool.

Version: executor@1.4.15

Command:

executor call paperless profile profileRetrieve

This also fails when including a JSON arg:

executor call paperless profile profileRetrieve '{}'

Error:

e.rawPathParts.at is not a function. (In 'e.rawPathParts.at(-1)', 'e.rawPathParts.at' is undefined)

This looks like it comes from resolveToolInvocation here:

https://github.com/RhysSullivan/executor/blob/f1b74b7/apps/cli/src/main.ts#L1099

const maybeJsonArg = input.rawPathParts.at(-1)?.trim();

rawPathParts is typed as ReadonlyArray<string>, but at runtime it does not seem to be a real array in the installed CLI. My guess is that Args.variadic(Args.string("tool-path-segment")) is returning an array-like or Effect collection in this runtime, so .at is missing.

This makes executor call unusable, even for a no-argument tool path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions