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

Set headless mode automatically #4166

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Aug 20, 2024

Motivation

CmdLine has a --headless flag that lets CKAN know that it is not connected to an interactive terminal to suppress certain prompts or outputs. Many other terminal programs handle this automatically by checking properties of the stdin/stdout file handles.

Changes

Now if stdin or stdout is redirected, we set --headless automatically.

If you pass --verbose, a notification is printed that also gives a little detail about which file handle was detected as redirected:

777 [1] INFO CKAN.CmdLine.CommonOptions (null) - Setting headless mode (input redirected)

@HebaruSan HebaruSan added Enhancement Cmdline Issues affecting the command line labels Aug 20, 2024
@HebaruSan HebaruSan merged commit 9007b20 into KSP-CKAN:master Aug 20, 2024
3 checks passed
@HebaruSan HebaruSan deleted the feature/auto-headless branch August 20, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmdline Issues affecting the command line Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant