Skip to content

[branch-utilities] Provide 'noLog' option for getBranchInfo | isGithubWorkflow #20

@simonmumenthaler

Description

@simonmumenthaler

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions