Code Monkey home page Code Monkey logo

Comments (2)

emmetog avatar emmetog commented on June 21, 2024

Also reproducible on Ubuntu 20.04:

# av apply --inventory ./infrastructure-aviary/ --log-level debug
2020-10-02 15:25:55.203 | INFO | Using local inventory /<redacted>/infrastructure-aviary
2020-10-02 15:25:55.257 | INFO | Running apply
2020-10-02 15:25:55.262 | INFO | Applying module test
2020-10-02 15:25:55.271 | DEBUG | Testing
2020-10-02 15:25:55.286 | INFO | Done
# av apply --inventory ./infrastructure-aviary/
2020-10-02 15:26:00.556 | INFO | Using local inventory /<redacted>/infrastructure-aviary
2020-10-02 15:26:00.602 | INFO | Running apply
2020-10-02 15:26:00.604 | INFO | Applying module test
2020-10-02 15:26:00.608 | ERROR | The command `LSLOG 10 2>&1` exited with exit code 141
2020-10-02 15:26:00.609 | ERROR | Failed
# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

from aviary.sh.

emmetog avatar emmetog commented on June 21, 2024

Seems to be because of this line at the very top of av:

set -euo pipefail

Removing this line seems to let things work as they should, but I'm not enough of a bash expert to know if removing it will break something else.

The actual bit of code that is breaking is here, in ./log:

  [[ $# -ne 0 ]] && _MSG="$@" || _MSG="$(cat)"
  if [[ "$LS_OUTPUT" = "/dev/stdout" ]] ; then
    echo -ne "$_LS_LEVEL_BEGIN$OUTPUT "
    echo -ne  "$_MSG"
    echo -e "$_LS_LEVEL_END"
  elif [[ "$LS_OUTPUT" = "/dev/stderr" ]] ; then
    echo -ne "$_LS_LEVEL_BEGIN$OUTPUT " >&2
    echo -ne  "$_MSG" >&2
    echo -e "$_LS_LEVEL_END" >&2
  else
    echo -ne "$_LS_LEVEL_BEGIN$OUTPUT " >> "$LS_OUTPUT"
    echo -n  "$_MSG"                    >> "$LS_OUTPUT"
    echo -e "$_LS_LEVEL_END" >> "$LS_OUTPUT"
  fi

Things break on the line echo -ne "$_MSG" >&2. Again unfortunately I'm not expert enough to suggest what the most appropriate fix is apart from removing set -euo pipefail as above.

from aviary.sh.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.