-
Notifications
You must be signed in to change notification settings - Fork 121
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
CLI tool does not update when using Windows #1147
Comments
Actually I'd suggest four things. If in fact this should (1) run under Windows then: (2) The error on line 382 is reported (in -vvv verbose mode) as a warning (and therefore nor normally shown to the user, and not treated as a failure to update); instead it should be handled as an error, and the update process should report the error, instead of reporting that the CLI has been succesfully updated. (3) This error shouldn't occur! The observed behaviour is that after running the update command
(4) A final issue is that although we invoke the command |
Thank you both for the detailed descriptions. I agree it looks like the key is that the failure to rename is not properly handled, and that needs to be fixed. But... I wouldn't expect to run export PLATFORMSH_CLI_NO_INTERACTION=1 which removes the chance of any blocking questions, and also disables update checking. PS. The mix of back- and forward-slashes is ugly but it should be handled fine by PHP. |
Hi Patrick, Thanks for your response. The process is using (I'm almost certain that we experimented with using Hence, we tried having the batch script that kicks off the process first do a However, we'll now try |
Meanwhile, please let me know if there's some way we can help you debug the underlying issue with updating the CLI. |
Hi Patrick - now that there's been an update allowing us to test it - I can confirm that using PLATFORMSH_CLI_NO_INTERACTION has solved our main problem. Thanks very much for this, It remains the case (as of 3.80.0 -> 3.81.1) that the updater fails on Windows. |
Thanks for the update. There are 2 things remaining: debugging the permissions issue (to fix Windows update) and also patching or replacing the now-abandoned updater library (to fix the error message). So maybe let's focus on this to start with
It might be related to this note in the PHP docs:
Is the existing |
Hi Patrick
Yes it is. |
We run automated scripts on a Windows machine to populate a database and then switch environment variables to switch between them (a sort of cursory green/blue style workflow). Unfortunately, the build scripts have to be run on Windows due to a particular tool we use that does not run very well at the moment on Linux machines.
As part of these scripts, we run the Platform.sh CLI commands to update environment variables. This was working well for a while, but now when we get prompted to update the CLI if a new verison is available, Windows reports the CLI as having been updated - but this is not actually the case.
When running in verbose mode, we can see that there's an access denied error:
However the message afterwards is misleading, as the CLI tool has not actually been updated.
I suppose this boils down to two things:
We're currently running PHP 8.1.7 on an AWS Windows machine (I believe it's one of the old Enterprise LTS Windows versions - 20H2 or something like that)
The text was updated successfully, but these errors were encountered: