nextcloud / nextcloud/notify_push

Use 'command -v' over 'which'

Open
#586 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
344
Forks
64
Avg merge
2d 10h
Merged PRs (30d)
5

Description

SetupWizard calls which on systemctl and getenforce (https://github.com/nextcloud/notify_push/blob/main/lib/SetupWizard.php#L75), but which isn't necessary installed. Wasn't on my server.

Usually command -v is preferred in scripting, it's at least POSIX.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/SetupWizard.php around line 75, where SetupWizard checks for systemctl and getenforce with which. Update those checks to use the requested POSIX-supported command lookup, then verify the setup path no longer depends on which being installed.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, shell
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.