-
Notifications
You must be signed in to change notification settings - Fork 27
Checking hasUpdate() should not require is_writable for phar file. #20
Comments
What would be a use case for this? |
This comes up often for me with scripts which are globally installed. For instance, we deploy a phar automatically to /usr/bin/myscript which is used by users across the system. Most of the users use the phar, but only one should be allowed to update it. In the event of a failure when an unprivileged user uses the phar, she should be able to see if the phar is up to date, and request that the administrator update it. Ideally, we would be able to institute a check when users run other commands, which would use phar-updater to check if the latest version is in use. Then, when a user ran Additionally, we have scripts that do integrity checks on systems. These scripts should not be able to write to the system, but it would be nice if they could check if globally-installed phar files are up-to-date and report that to system administrators. |
I have added this in PR #21 |
That's what I imagined myself. But on the other hand isn't it's administrator job to ensure all stuff is up to date and not forward that task on regular user 😄
I'd like that, but again this could be an option because displaying Can you please also attach an exception trace? |
I've been AWOL for a while, but I'll doing a round of PR reviews eventually. I see no harm in this change myself if it's useful. |
Hi, |
I would like unprivileged system users, who do not have the ability to run self-update commands, to be able to check if an update for the command is available. Currently, the following results in an exception:
Here's the exception of the local phar file is not writable:
I think the new Updater() is checking for writability... but writing shouldn't be required to check for updates.
The text was updated successfully, but these errors were encountered: