Skip to content

Commit

Permalink
Support passing a config file to the CLI tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Mar 7, 2017
1 parent 8f45fe9 commit 300de58
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion framework/Refactor/lib/Horde/Refactor/Cli.php
Expand Up @@ -63,6 +63,14 @@ public static function main()
'help' => 'Overwrite the refatored files',
)
),
new Horde_Argv_Option(
'-c',
'--config-file',
array(
'action' => 'store',
'help' => 'Configuration file to use',
)
),
)
);
list($options, $arguments) = $parser->parseArgs();
Expand Down Expand Up @@ -96,7 +104,7 @@ public static function main()
$cli->writeln($cli->bold($cli->header($header, '=', '=')));

require $arguments[0];
$config = new Config();
$config = new Config($options->config_file);
$class = 'Horde\\Refactor\\Rule\\' . $arguments[1];

foreach ($files as $file) {
Expand Down

0 comments on commit 300de58

Please sign in to comment.