sloth-tools / sloth-app

Sloth desktop app
https://sloth-tools.github.io/sloth-app/
18 stars 4 forks source link

Cannot add some packages to the developer system packages list #21

Open hectahertz opened 7 years ago

hectahertz commented 7 years ago

Expected Behavior

We can add "zeromq", "memcached", "rabbitmq", "ossp-uuid" to the developer system packages

Current Behavior

It doesn't install the packages:

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
inspircd

Warning: ansible-2.3.0.0_2 already installed

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [127.0.0.1]

TASK [Install homebrew packages] ***********************************************
ok: [127.0.0.1]

TASK [Brew cleanup] ************************************************************
changed: [127.0.0.1]

TASK [Install casks] ***********************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: 'NoneType' object is not iterable
fatal: [127.0.0.1]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n  File \"/var/folders/mq/dtv309513b90g3f5j6yh96n80000gq/T/ansible_bt2uLG/ansible_module_homebrew_cask.py\", line 610, in <module>\n    main()\n  File \"/var/folders/mq/dtv309513b90g3f5j6yh96n80000gq/T/ansible_bt2uLG/ansible_module_homebrew_cask.py\", line 600, in main\n    (failed, changed, message) = brew_cask.run()\n  File \"/var/folders/mq/dtv309513b90g3f5j6yh96n80000gq/T/ansible_bt2uLG/ansible_module_homebrew_cask.py\", line 368, in run\n    self._run()\n  File \"/var/folders/mq/dtv309513b90g3f5j6yh96n80000gq/T/ansible_bt2uLG/ansible_module_homebrew_cask.py\", line 412, in _run\n    return self._install_casks()\n  File \"/var/folders/mq/dtv309513b90g3f5j6yh96n80000gq/T/ansible_bt2uLG/ansible_module_homebrew_cask.py\", line 485, in _install_casks\n    for cask in self.casks:\nTypeError: 'NoneType' object is not iterable\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}
    to retry, use: --limit @/Users/hector.garcia/.sloth/sloth_install.retry

PLAY RECAP *********************************************************************
127.0.0.1                  : ok=3    changed=1    unreachable=0    failed=1   

(^_^) We're done here. Please check everything is in place.

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Steps to Reproduce

  1. developer.json file contents
{
  "system": [
    "httpie",
    "mysql",
    "node",
    "npm",
    "nvm",
    "openssl",
    "rbenv",
    "rbenv-aliases",
    "rbenv-gemset",
    "rbenv-vars",
    "readline",
    "redis",
    "ruby-build",
    "the_silver_searcher",
    "tmux",
    "wget",
    "zeromq",
    "memcached",
    "rabbitmq",
    "ossp-uuid"
  ],
  "cask": [
    "atom",
    "ccmenu",
    "docker",
    "macvim",
    "sequel-pro"
  ]
}
  1. Run Sloth and select 'Developer'
  2. Check one of the newly added packages for installation, such as zeromq
  3. Proceed with the installation.
  4. Check the console log.

Context

I also received an error the first time I ran the command-line version of Sloth on my machine, sadly I didn't keep the logs. This may or may not be related.

uesteibar commented 7 years ago

@hectahertz I'll have a look into this, thanks for reporting!

uesteibar commented 7 years ago

It seems to be related to the case when in one of the types of packages (system or cask) there are none selected.