| @@ 331-346 (lines=16) @@ | ||
| 328 | * @param string $command |
|
| 329 | * @return CommandResult |
|
| 330 | */ |
|
| 331 | public function runCommandAgainstHostManager($vmDetails, $command) |
|
| 332 | { |
|
| 333 | // what are we doing? |
|
| 334 | $log = usingLog()->startAction("run vagrant command '{$command}'"); |
|
| 335 | ||
| 336 | // build the command |
|
| 337 | $fullCommand = "cd '{$vmDetails->dir}' && $command 2>&1"; |
|
| 338 | ||
| 339 | // run the command |
|
| 340 | $commandRunner = new CommandRunner(); |
|
| 341 | $result = $commandRunner->runSilently($fullCommand); |
|
| 342 | ||
| 343 | // all done |
|
| 344 | $log->endAction("return code was '{$result->returnCode}'"); |
|
| 345 | return $result; |
|
| 346 | } |
|
| 347 | ||
| 348 | /** |
|
| 349 | * |
|
| @@ 354-369 (lines=16) @@ | ||
| 351 | * @param string $command |
|
| 352 | * @return CommandResult |
|
| 353 | */ |
|
| 354 | public function runCommandViaHostManager($vmDetails, $command) |
|
| 355 | { |
|
| 356 | // what are we doing? |
|
| 357 | $log = usingLog()->startAction("run vagrant command '{$command}'"); |
|
| 358 | ||
| 359 | // build the command |
|
| 360 | $fullCommand = "cd '{$vmDetails->dir}' && vagrant ssh -c \"$command\""; |
|
| 361 | ||
| 362 | // run the command |
|
| 363 | $commandRunner = new CommandRunner(); |
|
| 364 | $result = $commandRunner->runSilently($fullCommand); |
|
| 365 | ||
| 366 | // all done |
|
| 367 | $log->endAction("return code was '{$result->returnCode}'"); |
|
| 368 | return $result; |
|
| 369 | } |
|
| 370 | ||
| 371 | /** |
|
| 372 | * |
|
| @@ 329-344 (lines=16) @@ | ||
| 326 | * @param string $command |
|
| 327 | * @return CommandResult |
|
| 328 | */ |
|
| 329 | public function runCommandAgainstHostManager($baseFolder, $command) |
|
| 330 | { |
|
| 331 | // what are we doing? |
|
| 332 | $log = usingLog()->startAction("run vagrant command '{$command}'"); |
|
| 333 | ||
| 334 | // build the command |
|
| 335 | $fullCommand = "cd '{$baseFolder}' && $command 2>&1"; |
|
| 336 | ||
| 337 | // run the command |
|
| 338 | $commandRunner = new CommandRunner(); |
|
| 339 | $result = $commandRunner->runSilently($fullCommand); |
|
| 340 | ||
| 341 | // all done |
|
| 342 | $log->endAction("return code was '{$result->returnCode}'"); |
|
| 343 | return $result; |
|
| 344 | } |
|
| 345 | ||
| 346 | /** |
|
| 347 | * @param string $baseFolder |
|
| @@ 351-366 (lines=16) @@ | ||
| 348 | * @param string $command |
|
| 349 | * @return CommandResult |
|
| 350 | */ |
|
| 351 | public function runCommandViaHostManager($baseFolder, $command) |
|
| 352 | { |
|
| 353 | // what are we doing? |
|
| 354 | $log = usingLog()->startAction("run vagrant command '{$command}'"); |
|
| 355 | ||
| 356 | // build the command |
|
| 357 | $fullCommand = "cd '{$baseFolder}' && vagrant ssh -c \"$command\""; |
|
| 358 | ||
| 359 | // run the command |
|
| 360 | $commandRunner = new CommandRunner(); |
|
| 361 | $result = $commandRunner->runSilently($fullCommand); |
|
| 362 | ||
| 363 | // all done |
|
| 364 | $log->endAction("return code was '{$result->returnCode}'"); |
|
| 365 | return $result; |
|
| 366 | } |
|
| 367 | ||
| 368 | /** |
|
| 369 | * |
|