-- here's my string --this-wont-matter
Hi there,
I made me a RoboFile and made that global available as an alias:
siri='robo --load-from ~/robo/RoboFile.php '
I would now like to do things based on where I am currently now. For Example:
cd /some/where/on/my/mac/
siri create:file
and that should create an file some/where/on/my/mac/myFile.txt
. But what how ever I try to get the current folder, I always get the path of my RoboFile.php in ~/robo/
/some/where/on/my/mac/
?
Hi, is there a way to catch the exit code in the taskExecStack()
? I try to do so, but always get 1 as result.
My desired behavour is to let Robo exit with an error code or throw an exception if the command stack failed.
I have something like this:
Code
$tools = $this->taskExecStack()
->dir('./vendor/bin/');
$tools
->exec('which git')
->exec('echo Hallo');
$tools->run();
$this->say('Result: ' . print_r($tools->getPrinted()));
Success:
/usr/bin/git
Hallo
[ExecStack] Done in 0.002s
Result: 1
Error (one Command fails):
[ExecStack] Exit code 1 Time 0.004s
Result: 1
I would like to catch this "Exit Code 1" message, and thought getPrinted is the correct way, but it isnt obviously.
@pixelbrackets_twitter Ah, read the docs for taskExec
and stumbled upon the wasSuccessful()
example code. So I need to work with the response of the run method and do this:
$tools = $this->taskExecStack()
->dir('./vendor/bin/');
$tools
->exec('which git')
->exec('echo Hallo');
$result = $tools->run();
if($result->wasSuccessful() !== true) {
$this->say('Error');
}
Solved ✔️
__contruct()
work? :)
Hi everyone, i'm new here, i just have a question . I try to use gulp like this :
$this->taskGulpRun('gulpCommand','folder/gulpfile.js')->run();
and i get :
sh: 1: folder/gulpfile.js: Permission denied
I try to chmod this file but the message persist.
Someone could help me on this? Thx
Codegyre/Robo
to consolidation/Robo
but this Gitter channel still shows the old name.