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

Provide 'noLog' option for getBranchInfo' | isGithubWorkflow` #20

Open
simonmumenthaler opened this issue Aug 18, 2023 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@simonmumenthaler
Copy link
Contributor

In different projects we use a js script to create a command which is then executed in the terminal with eval:
eval "$(node ../../set_env.mjs)"

Currently we need to override the console.log function to prevent undesired log statements when calling getBranchInfo.

something like:

const oldLogger = console.log
console.log = function () {}
const { isProd } = getBranchInfo(process.env)
const isNotGithubWorkflow = !isGithubWorkflow(process.env)
console.log = oldLogger

process.stdout.write(...)

It would be more ergonomic to simply provide a flag for a noLog option

@michaelwittwer michaelwittwer added the enhancement New feature or request label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants