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