Skip to content
This repository has been archived by the owner. It is now read-only.

[Enhancement] -quiet parameter that silences almost all output #416

Merged
merged 2 commits into from Jun 17, 2014

Conversation

@jole78
Copy link
Contributor

commented Feb 6, 2014

fix for issue #411 discussed at https://groups.google.com/forum/#!topic/chocolatey/yCV3J6BuvpY

Added a new parameter, logout, which is true be default but now you can turn Write-Host off by setting it to true.
Tried to add tests for this but since the actual issue is Write-Host it gets hard to test for WH not being called, thus turning it off, and then Pester wont output anything.
As I said I actually wrote some tests but they didn't feel right.
Maybe I'm wrong here.
Tested locally with DSC (desired state configuration) and it work great.

Comments...

@mwrock

This comment has been minimized.

Copy link
Contributor

commented Feb 6, 2014

This is great. However -logout seems poorly named to me. The first thing I think of is signing out of something. How about using -Quiet?

@jole78

This comment has been minimized.

Copy link
Contributor Author

commented Feb 7, 2014

I like quiet better too but the "problem" is that I want the default value to be true, hence always use the "real" write-host but this gives us the option to turn that off....the result of that being quiet mode. Ideas?

@mwrock

This comment has been minimized.

Copy link
Contributor

commented Feb 7, 2014

If you used -Quiet and made the default $false, wouldn't that have the same effect?

@ferventcoder

This comment has been minimized.

Copy link
Contributor

commented Feb 7, 2014

I have to agree on logout. I'm not sure quiet is the right answer either.
We need something more descriptive yet succinct.

On Fri, Feb 7, 2014 at 8:49 AM, Matt Wrock notifications@github.com wrote:

If you used -Quiet and made the default $false, wouldn't that have the
same effect?

Reply to this email directly or view it on GitHubhttps://github.com//pull/416#issuecomment-34442342
.

Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@jole78

This comment has been minimized.

Copy link
Contributor Author

commented Feb 7, 2014

Went with quiet for now, didn't see your comment before I pushed @ferventcoder...sorry. Quiet makes better sense that logout at least.

@jole78

This comment has been minimized.

Copy link
Contributor Author

commented Feb 10, 2014

Quiet or Silent seems to be the defacto standard for silent/quiet installers...so either one of those will do I think. Comments?

@ferventcoder

This comment has been minimized.

Copy link
Contributor

commented Feb 10, 2014

Quiet/silent imply no output whatsoever.

On Monday, February 10, 2014, Johan Leino notifications@github.com wrote:

Quiet or Silent seems to be the defacto standard for silent/quiet
installers...so either one of those will do I think. Comments?

Reply to this email directly or view it on GitHubhttps://github.com//pull/416#issuecomment-34604268
.

Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@jole78

This comment has been minimized.

Copy link
Contributor Author

commented Feb 10, 2014

@ferventcoder but isn't that the desired effect...? (keep quiet...use silent mode....??)
I guess it depends what you mean with output then. With quiet/silent choco wouldn't output anything to the console but the file logger would still be used.
So would quiet imply that not even the file logger should be used then? How does a "normal" installer behave in quiet mode...does it log to a file anyway?

Is better to simply "say" -WriteHost $false ....hmm not sure that's any better though.
Is -Feedback $false or -NoFeedback better...I don't know.

OK, I'm out of ideas now I think...

@mwrock

This comment has been minimized.

Copy link
Contributor

commented Feb 10, 2014

Yes. I think that is what @jole78 was intending this argument to accomplish and something that I think makes sense - completely silence the "Host" stream. I'm assuming keeping the other streams, output/warning/verbose/error untouched is desired since there are already ways built into the PS syntax to silence or redirect those.

@ferventcoder

This comment has been minimized.

Copy link
Contributor

commented Feb 11, 2014

Ah guess I wasn't paying attention to this as completey as I should have
before commenting. Yes quiet or silent should be fine.

On Monday, February 10, 2014, Matt Wrock notifications@github.com wrote:

Yes. I think that is what @jole78 https://github.com/jole78 was
intending this argument to accomplish and something that I think makes
sense - completely silence the "Host" stream. I'm assuming keeping the
other streams, output/warning/verbose/error untouched is desired since
there are already ways built into the PS syntax to silence or redirect
those.

Reply to this email directly or view it on GitHubhttps://github.com//pull/416#issuecomment-34677935
.

Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@jole78

This comment has been minimized.

Copy link
Contributor Author

commented Feb 11, 2014

@mwrock exactly. @ferventcoder :) ...looking forward to a merge then....

@ferventcoder ferventcoder changed the title (#411) added logout parameter and forced write-host to honor that param (#411) added quiet parameter and forced write-host to honor that param Jun 17, 2014
@ferventcoder ferventcoder changed the title (#411) added quiet parameter and forced write-host to honor that param [Enhancement] added quiet parameter and forced write-host to honor that param (#411) Jun 17, 2014
@ferventcoder ferventcoder merged commit 41c63b8 into chocolatey-archive:master Jun 17, 2014
@ferventcoder

This comment has been minimized.

Copy link
Contributor

commented Jun 17, 2014

This closes #411

@ferventcoder ferventcoder changed the title [Enhancement] added quiet parameter and forced write-host to honor that param (#411) [Enhancement] -quiet parameter that silences almost all output Jul 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.