Skip to content

Commit 119e5a3

Browse files
committed
composer: Fix changed status that always returns False
re.match in has_changed function never worked properly, because match requires searched sequence to be present exactly at a start of processed string, which is not the case here.
1 parent 8b51b76 commit 119e5a3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packaging/composer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ def parse_out(string):
101101
return re.sub("\s+", " ", string).strip()
102102

103103
def has_changed(string):
104-
return (re.match("Nothing to install or update", string) != None)
104+
if "Nothing to install or update" in string:
105+
return False
106+
else:
107+
return True
105108

106109
def composer_install(module, command, options):
107110
php_path = module.get_bin_path("php", True, ["/usr/local/bin"])

0 commit comments

Comments
 (0)