Skip to content

Commit

Permalink
fixed no cask app case
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmdnk committed Nov 2, 2014
1 parent 84da861 commit 7c558eb
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions bin/brew-file
Expand Up @@ -59,8 +59,8 @@ class BrewFile:
cask_opts.update(dict(map(lambda x: x.split("="),
re.split(r'(?<!\\)\s*', env_cask_opts))))
except ValueError:
print "\033[31mHOMEBREW_CASK_OPTS: " + env_cask_opts + " is not a proper format.\033[m"
print "\033[31mIgnore the value.\n\033[m"
print "\033[31;1mHOMEBREW_CASK_OPTS: " + env_cask_opts + " is not a proper format.\033[m"
print "\033[31;1mIgnore the value.\n\033[m"

self.opt = {}

Expand Down Expand Up @@ -451,13 +451,14 @@ class BrewFile:
(ret, lines) = self.proc("brew cask list", False, False)
self.opt["cask_list"] = []
self.opt["cask_list_nocask"] = []
for p in lines:
if len(p.split()) == 1:
self.opt["cask_list"].append(p)
else:
print "\033[31;1mthe cask file of \033[31;7m" + p + "\033[0m\033[31;1m doesn't exist."
print "please check later.\n\n\033[0m"
self.opt["cask_list_nocask"].append(p)
if ret != 0:
for p in lines:
if len(p.split()) == 1:
self.opt["cask_list"].append(p)
else:
print "\033[31;1mthe cask file of \033[31;7m" + p + "\033[0m\033[31;1m doesn't exist."
print "\033[31;1mplease check later.\n\n\033[0m"
self.opt["cask_list_nocask"].append(p)

def read_input(self):
"""Read input file"""
Expand Down

0 comments on commit 7c558eb

Please sign in to comment.