From: epriestley Date: Wed, 16 Dec 2015 14:00:50 +0000 (-0800) Subject: When `arc` is run with `--trace`, print out argv explicitly X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a183c2c4ba5836628a6bf1285a7e9109d2866fde;p=arcanist.git When `arc` is run with `--trace`, print out argv explicitly Summary: Ref T9993. Users may have shell aliases or wrapper scripts that they forget about. Print out the arguments we received to make it obvious that something went through an indirection layer. Test Plan: Ran `arc version --help`. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9993 Differential Revision: https://secure.phabricator.com/D14797 --- diff --git a/scripts/arcanist.php b/scripts/arcanist.php index f29311f6..c888fae9 100755 --- a/scripts/arcanist.php +++ b/scripts/arcanist.php @@ -74,17 +74,27 @@ $config = null; $workflow = null; try { + if ($config_trace_mode) { + echo tsprintf( + "** %s ** %s\n", + pht('ARGV'), + csprintf('%Ls', $original_argv)); + + $libraries = array( + 'phutil', + 'arcanist', + ); - $console->writeLog( - "%s\n", - pht( - "libphutil loaded from '%s'.", - phutil_get_library_root('phutil'))); - $console->writeLog( - "%s\n", - pht( - "arcanist loaded from '%s'.", - phutil_get_library_root('arcanist'))); + foreach ($libraries as $library_name) { + echo tsprintf( + "** %s ** %s\n", + pht('LOAD'), + pht( + 'Loaded "%s" from "%s".', + $library_name, + phutil_get_library_root($library_name))); + } + } if (!$args) { if ($help) {