]> khamidou — GitHub mirrors - arcanist.git/commit
Fix callsites which called libphutil_console_wrap like it were _format
authorAlex Vandiver <alexmv@dropbox.com>
Thu, 3 Sep 2015 19:01:01 +0000 (12:01 -0700)
committerepriestley <git@epriestley.com>
Thu, 3 Sep 2015 19:01:01 +0000 (12:01 -0700)
commit7e677c27eccfeaaf15921e8edbbc8eb5f1951351
treeb400e2f061f6f99f57b96c844ddae05a55490fda
parent029e5a7c2900b7a4f516ac7e7c1415b0c6500ed1
Fix callsites which called libphutil_console_wrap like it were _format

Summary:
7e2df9a attempted to pht() some strings; unfortunately, it assumed
that some things that were calls to phutil_console_wrap() were
actually calls to phutil_console_format().  This produces errors of
the form:

    [2015-07-17 21:17:28] ERROR 2: str_repeat() expects parameter 2 to be long, string given at [/usr/local/libphutil/src/console/format.php:162]
    #0 str_repeat(string, string) called at [<phutil>/src/console/format.php:162]
    #1 phutil_console_wrap(string, string, string) called at [<arcanist>/scripts/arcanist.php:620]
    #2 arcanist_load_libraries(array, boolean, string, ArcanistWorkingCopyIdentity) called at [<arcanist>/scripts/arcanist.php:154]
    %s: %s

Provide an additional call to phutil_console_format() when necessary,
or simply append the relevant characters if possible.

Test Plan: Caused a library load error

Reviewers: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14053
scripts/arcanist.php
src/workflow/ArcanistDiffWorkflow.php
src/workflow/ArcanistWorkflow.php