Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dan Feder
    @dafeder
    you said you prefer it primarily because you can control output better?
    Jon Pugh
    @jonpugh
    that and it's just more direct. cut out the middlecode
    more control of everything
    Dan Feder
    @dafeder
    sure
    Jon Pugh
    @jonpugh
    and it's the same dev experience, really.
    in the end I saw no benefit to taskExec()
    Dan Feder
    @dafeder
    I find it confusing when taskExec wraps an arg passed by arg() in single quotes and when it doesnt
    Jon Pugh
    @jonpugh
    Greg1anderson doesn't hang out here, you can find him in the #drush room on drupal slack... there's more active chat about robo there, I think
    he loves to talk robo but I don't see him in here :D
    Dan Feder
    @dafeder
    oh cool good to know
    one thing i could never figure out with console was how to pass a long string as a single argument with no parsing - like if i wanted to create a wrapper command for drush
    there didn't seem to be an equivilant of just passing -- here's my string --this-wont-matter
    Jon Pugh
    @jonpugh
    huh, not sure, never used that
    you should be able to just create a single command string though
    you don't have to use the args builder stuff if you don't want to, I think
    oh wait I see what you mean,
    you mean when running the CLI command with -- after it? that should be passed in as an input arg
    Dan Feder
    @dafeder
    yes, works in robo but not in a simple console app
    Jon Pugh
    @jonpugh
    huh... You can do fun stuff by replacing the Input Argv processor class thing, that must be what robos doing
    Dan Feder
    @dafeder
    oops docker-compose up does not actually accept -e env variables. so i do need to figure out a way to set env vars :\
    Jon Pugh
    @jonpugh
    try export= right in $command? :D
    or ...
    just... use... process ;)
    Dan Feder
    @dafeder
    yep
    Jon Pugh
    @jonpugh
    anyway I have to get back to it. Would love to hear about your use case some time. I've been rewriting provision4 from scratch as a standalone CLI on robo+console, it's so much better than the legacy stuff. Since it will power aegir 4+ it has to work well with Distros, so if we are aware of what DKAN needs we can tailor it pretty directly. It actually can load Robofiles right from your site codebase, so even if you needed totally custom commands outside the scope of Provision you can. Check out https://docs.provision4.org/customizing-provision on all the ways I've made it customizable so far.
    Good to see you! I'll be in austin, montreal, asheville, and govcon this summer, maybe I'll see you at one of those.
    Dan Feder
    @dafeder
    cool will check it out thanks for your help @jonpugh
    Derek KM
    @dehrk
    is there a way to specify the credentials GitStack uses at runtime?
    bandanh
    @bandanh

    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/

    Any Idea how I can access get the path /some/where/on/my/mac/?
    bandanh
    @bandanh
    Hi, I am running robo like this robo --load-from _tools/robo generate config. Now how do i get path of the directory from which the command was run?
    @d34dman I think you got the same problem then I got, did you find a solution?
    bandanh
    @bandanh
    Hmm, maybe I have to create my own .phar, put it into $PATHinstead of a alias to do that :(
    Dan Feder
    @dafeder
    I have my commands separated into several classes - how might I run a command from one class in another class?
    rotemreiss
    @rotemreiss
    Hi, Can someone help me with some basic robo things I'm trying to do? (I'm new to Robo)
    Nikos
    @verminoz
    Hi everybody, thank you for a really cool tool. I just starting looking into it after I saw a presentation about it in Drupal Dev Days in Lisbon :)
    I have one technical question though that has been bugging me. I cannot see any obvious way that one can get a variable with the output of the commands run. Is that possible at all?
    rotemreiss
    @rotemreiss
    @verminoz yes it is.
    ->run()->getMessage()
    If I'm not wrong
    Dan
    @pixelbrackets_twitter

    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.

    Dan
    @pixelbrackets_twitter

    @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 ✔️

    Frederick Henderson
    @frederickjh
    What is the best way to get the output of a taskExec command and put it in a variable? My taskExec runs but the output prints out in the terminal.
    $this->taskExec('git rev-parse --abbrev-ref HEAD')->dir('../public_html')->run();
    G
    @_double_twitter
    What is the best way to go about setting environment variables need to a task, like https://github.com/consolidation/Robo/blob/master/src/Task/Testing/PHPUnit.php? I see there is a ::envVars() method, but not sure it is doing anything.
    G
    @_double_twitter
    Robo\Common\ExecTrait::envVars() that is
    René Backhaus
    @reneroboter
    Hello, are they beginner friendly issues availbale. I can't see labels for that.?
    Michael Prasuhn
    @mikeyp
    is there a hook that I can use to run before ever command?
    jesxs
    @jesxs
    How can I pass a variable to a suite from RoboFile?
    Jon Pugh
    @jonpugh
    @jesxs What do you mean suite, like a test suite?
    @mikeyp would __contruct() work? :)
    Guisharko
    @Guisharko

    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