ruby-install icon indicating copy to clipboard operation
ruby-install copied to clipboard

Add a debug flag to know what is happening

Open eloyesp opened this issue 7 years ago • 4 comments

As mentioned in #294 it just adds a debug flag to see what commands are being run.

I don't know how to add tests for it :(

eloyesp avatar Mar 08 '17 16:03 eloyesp

On the testing front, it doesn't address the feature functionality, but it'd be nice to test the option parsing in test/ruby-install-tests/parse_options_test.sh.

havenwood avatar Jun 26 '18 00:06 havenwood

@havenwood I did that but it adds a xtrace for shunit with a lot of noise within the tests :)

function test_parse_options_with_debug()
{
       parse_options "--debug" "ruby"

       assertTrue "did not set -x within the script" "[ -o xtrace ]"
}

eloyesp avatar Jun 27 '18 13:06 eloyesp

@eloyesp Ahh, good point.

havenwood avatar Jun 27 '18 16:06 havenwood

My only concern is that set -x may be too verbose for most use cases.

postmodern avatar Aug 05 '18 02:08 postmodern