Skip to content

Commit

Permalink
Removed support for deprecated --caskroom option
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikMinekus committed Aug 8, 2017
1 parent 8564f94 commit da847a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -19,7 +19,7 @@ If you installed Homebrew Cask and changed where the applications are installed

```shell
# Specify your defaults in this environment variable
export HOMEBREW_CASK_OPTS="--appdir=/Applications --caskroom=/usr/local/Caskroom"
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
```

You need to update workflow's settings accordingly to your configuration.
Expand Down
6 changes: 2 additions & 4 deletions src/cask.py
Expand Up @@ -16,7 +16,6 @@
DEFAULT_SETTINGS = {
'HOMEBREW_CASK_OPTS': {
'appdir': '/Applications',
'caskroom': '/usr/local/Caskroom'
}
}

Expand All @@ -28,9 +27,8 @@ def execute(wf, command):
opts = wf.settings.get('HOMEBREW_CASK_OPTS', None)
cmd_list = ['brew', 'cask', command]
if opts:
if all(k in opts for k in ('appdir', 'caskroom')):
cmd_list += ['--appdir=%s' % opts['appdir'],
'--caskroom=%s' % opts['caskroom']]
if all(k in opts for k in ('appdir')):
cmd_list += ['--appdir=%s' % opts['appdir']]

new_env = os.environ.copy()
new_env['PATH'] = '/usr/local/bin:%s' % new_env['PATH']
Expand Down

0 comments on commit da847a6

Please sign in to comment.