Skip to content

operable:unique fails when value is empty #1391

@splashx

Description

@splashx

dio: !ec2:instance-list | raw | echo $security_groups

cog APP:

[]
[]
[]
[{"group_name":"launch-wizard-1","group_id":"sg-6cb8d309"}]
[]

dio: !ec2:instance-list | echo $security_groups | unique | raw

cog APP:

It appears that the `operable:unique` command crashed while executing, with the following error:

`%CaseClauseError{term: ""}`

Here is the stacktrace at the point where the crash occurred. This information can help the authors of the command determine the ultimate cause for the crash.

```  [file: 'lib/cog/commands/unique.ex', line: 25]},
 {Cog.Command.GenCommand, :process_message, 3,
  [file: 'lib/cog/command/gen_command.ex', line: 188]},
 {Cog.Command.GenCommand, :handle_info, 2,
  [file: 'lib/cog/command/gen_command.ex', line: 163]},
 {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 601]},
 {:gen_server, :handle_msg, 5, [file: 'gen_server.erl', line: 667]},
 {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]``````

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions