Skip to content

fix: check cgroup file readability to prevent warning on android#419

Open
geoffsym wants to merge 1 commit into
pure-fish:masterfrom
geoffsym:fix/cgroup-namespace-check
Open

fix: check cgroup file readability to prevent warning on android#419
geoffsym wants to merge 1 commit into
pure-fish:masterfrom
geoffsym:fix/cgroup-namespace-check

Conversation

@geoffsym

@geoffsym geoffsym commented Jun 8, 2026

Copy link
Copy Markdown

Fixes the following error message on every prompt in the Termux Android app (and presumably other non-standard Linux environments):

warning: An error occurred while redirecting file '/proc/1/cgroup'
warning: Path '/proc/1' does not exist

How to test pre-release?

☠️ Feature can be unstable and break your prompt!

fisher install geoffsym/pure@fix/cgroup-namespace-check

Acceptance Checks

  • Tests are passing

--argument-names cgroup_namespace
set --query cgroup_namespace[1]; or set cgroup_namespace /proc/1/cgroup

test -r $cgroup_namespace; or return 1

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code conventions say to use long form options, but test lacks any long form options

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @geoffsym,
Thanks for the contribution!

Mentioning android raised our eyebrows. We didn't expect people to use pure on mobile.

it will be preferable to disable the detection feature than to mute the warning in the project.

set --universal pure_enable_container_detection false

Convention

The long option rule is not applicable here

@edouard-lopez

Copy link
Copy Markdown
Member

Is this PR still relevant?

N.B.: In the absence of reply a month after this message, I will close it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants