workflow_script icon indicating copy to clipboard operation
workflow_script copied to clipboard

Update Launcher.php - call sh with absolute path

Open nivadis opened this issue 1 year ago • 5 comments

use absolute path for sh command

nivadis avatar Nov 18 '24 14:11 nivadis

why would we want to do this?

blizzz avatar Nov 18 '24 20:11 blizzz

for me as example: the nixos nextcloud-cron doesn't have the valid $PATH to find sh.

but this will also be fixed hopefully https://github.com/NixOS/nixpkgs/pull/356988 afaik the $PATH containing the location of sh is needed for POSIX compatibility

nivadis avatar Nov 19 '24 08:11 nivadis

I think it is fair to assume sh is present and the location based on the $PATH env var should always be preferred over a hard coded and assumed path.

What would be more acceptable is to check whether command -v sh results in a known path and stick with simple sh, and test for an existing /bin/sh only as fallback.

The most preferred solution though is that the nix package provides a path to the sh bin.

blizzz avatar Nov 19 '24 09:11 blizzz

Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

github-actions[bot] avatar Dec 03 '24 02:12 github-actions[bot]

The fallback to /bin/sh sounds good to me, but i agree the issue should also be fixed on the nix side.

nivadis avatar Dec 05 '24 09:12 nivadis