Skip to content

each no longer has any output from commands after upgrading to 0.31.0 #3447

Closed

Description

@ryanpcmcquen

Most mornings, to sync up my machine and upgrade things, I run a command like this:

λ brew update; brew upgrade; npm update -g; echo y | bit complete; ls ~/code | where type == Dir | each { cd $it.name; git remote -v; git branch; git pull --all; cd ~/code; }

In every nushell version before 0.31.0, I would see the output of the git commands, but now the output is completely blank. Did the syntax change?

Activity

  1. sophiajt commented on May 22, 2021

    @sophiajt
    Contributor

    You may need to put | autoview after the commands you want to print out. Using ; currently will redirect and remove the output.

    We may move to a style in the future where you use echo instead, for example echo (git remote -v) but we haven't made that change just yet.

  2. ryanpcmcquen commented on May 24, 2021

    @ryanpcmcquen
    Author

    | autoview works for each command I want to see, but there is a new issue, the tasks seem to run asynchronously now, and my prompt displays before the command has completed. Maybe this isn't an issue so much as a new feature @jonathandturner?

  3. sophiajt commented on May 24, 2021

    @sophiajt
    Contributor

    @ryanpcmcquen - are you able to try it against the latest in main by chance?

    I'm wondering if this comes from some of the refactoring we did for external calls. It's possible we missed something.

  4. ryanpcmcquen commented on May 26, 2021

    @ryanpcmcquen
    Author

    I don't have time right now, but it seems to only 'bypass' the shell when errors happen (so maybe a bug with STDERR?).

  5. sophiajt commented on May 26, 2021

    @sophiajt
    Contributor

    @ryanpcmcquen - that's possible. We don't redirect stderr, though there is support for it in the engine.

    I'm not quite sure of the right fix, but one possibility would be a configuration setting that told Nu to redirect both stdout and stderr into the same stream

    Another possible solution might be something like having two output streams from an external and then design a way for the command on the pipeline to work with the stderr case if they wanted

  6. ryanpcmcquen commented on Jun 8, 2021

    @ryanpcmcquen
    Author

    I think this may be fixed in 0.32.0, going to close for now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions