Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to Suppress chocolatey package command lines in chocolatey.log #955

Open
DarwinJS opened this issue Sep 9, 2016 · 5 comments
Open

Comments

@DarwinJS
Copy link
Contributor

DarwinJS commented Sep 9, 2016

Sometimes I have custom passwords I pass into a package (e.g. SQL Server SA password).

While I can't expect chocolatey to know what custom parameters are passwords, it would be nice to be able to suppress the entire display of the command line.

There is a precedent for this in the design pattern of MSIEXEC where the command line passed to MSI is never visible unless MSI debug logging is enabled in the registry.

I would be happy with simply being able to suppress the command line on packages where I know I am passing secrets.

If I had my druthers, I would have both a command line switch and a chocolatey feature option for this support.

UPDATE: Maybe a second parameter also hides the internal calls Chocolatey makes to it's built in install functions like Install-ChocolateyPackage ?

SIDETHOUGHT: Packer's pattern for secrets is to inject them into environment variables before calling script code. I could update my package's parameter parsing code to look for an environment variable and if present use it. That would hide it all the way through even to the command line in my chocolatey package.

Even if I do implement this sidethought pattern I think this request still has merit as there might be other reasons to need this and a coding pattern is a lot more work to discover and apply.

@ferventcoder
Copy link
Member

ferventcoder commented Sep 9, 2016

UPDATE: Maybe a second parameter also hides the internal calls Chocolatey makes to it's built in install functions like Install-ChocolateyPackage ?

This is exactly what #948 is for 0.10.1

@ferventcoder
Copy link
Member

ferventcoder commented Sep 9, 2016

There was a quiet parameter to keep the package from outputting any logging. We should re-add that back in.

@ferventcoder
Copy link
Member

SIDETHOUGHT: Packer's pattern for secrets is to inject them into environment variables before calling script code. I could update my package's parameter parsing code to look for an environment variable and if present use it. That would hide it all the way through even to the command line in my chocolatey package.

Even if I do implement this sidethought pattern I think this request still has merit as there might be other reasons to need this and a coding pattern is a lot more work to discover and apply.

Yes, and that is what #948 is about.

@ferventcoder
Copy link
Member

related to #953

@DarwinJS
Copy link
Contributor Author

DarwinJS commented Sep 9, 2016

Sweet - Sorry I wasn't able to find #948 before posting!

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

No branches or pull requests

2 participants