Skip to content

Commit

Permalink
update some
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jan 24, 2021
1 parent 7a70a04 commit 93f35f8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bin/kite
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,19 @@ $app->on(Application::ON_NOT_FOUND, static function (string $cmd, Application $a
return true;
}

// custom scripts
$scripts = $app->getParam('scripts', []);
if (!$scripts || !isset($scripts[$cmd])) {
if ($cmd[0] === '\\') {
$cmd = substr($cmd, 1);
}

$app->notice("input command is not found, will call system command '$cmd'");
$args = $app->getInput()->getArgs();

if ($args) {
$cmd .= ' ' . implode(' ', $args);
}

// call system command
CmdRunner::new($cmd)->do(true);
Expand Down

0 comments on commit 93f35f8

Please sign in to comment.