Fixing logic to detect existing composer command.