Skip to content

Windows: Add hardening when renaming Phar during update#995

Closed
swissspidy wants to merge 1 commit intomainfrom
try/harden-update
Closed

Windows: Add hardening when renaming Phar during update#995
swissspidy wants to merge 1 commit intomainfrom
try/harden-update

Conversation

@swissspidy
Copy link
Copy Markdown
Member

To test whether wp-cli/wp-cli#6297 fixes the following test failure here:

001 Scenario: Install WP-CLI nightly # features\cli.feature:119
When I run {PHAR_PATH} cli update --nightly --yes # features\cli.feature:123
$ php C:\Users\runneradmin\AppData\Local\Temp\wp-cli-test-run--69dea741de85d2.37607601\wp-cli-build-69dea741deb690.93926654.phar cli update --nightly --yes
Downloading from https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar...
sha512 hash verified: 208bab2070a699bf87474ce711867fb2b6607f1ab27ab1efbe480b8815a1c2fadd1b7b50fe2aeced5038d46190196297c92c86cbc727df1dec7efa5f215dc25e
New version works. Proceeding to replace.

    PHP Warning:  rename(C:\Users\RUNNER~1\AppData\Local\Temp/wp_69dea77007ade6.45222671.phar,C:\Users\runneradmin\AppData\Local\Temp\wp-cli-test-run--69dea741de85d2.37607601\wp-cli-build-69dea741deb690.93926654.phar): Access is denied (code: 5) in phar://C:/Users/runneradmin/AppData/Local/Temp/wp-cli-test-run--69dea741de85d2.37607601/wp-cli-build-69dea741deb690.93926654.phar/vendor/wp-cli/wp-cli/php/commands/src/CLI_Command.php on line 512
    Warning: rename(C:\Users\RUNNER~1\AppData\Local\Temp/wp_69dea77007ade6.45222671.phar,C:\Users\runneradmin\AppData\Local\Temp\wp-cli-test-run--69dea741de85d2.37607601\wp-cli-build-69dea741deb690.93926654.phar): Access is denied (code: 5) in phar://C:/Users/runneradmin/AppData/Local/Temp/wp-cli-test-run--69dea741de85d2.37607601/wp-cli-build-69dea741deb690.93926654.phar/vendor/wp-cli/wp-cli/php/commands/src/CLI_Command.php on line 512
    Error: Cannot move C:\Users\RUNNER~1\AppData\Local\Temp/wp_69dea77007ade6.45222671.phar to C:\Users\runneradmin\AppData\Local\Temp\wp-cli-test-run--69dea741de85d2.37607601\wp-cli-build-69dea741deb690.93926654.phar
    cwd: C:\Users\runneradmin\AppData\Local\Temp\wp-cli-test-run--69dea741de85d2.37607601/
    run time: 0.80361080169678
    exit status: 1
    
    The command unexpectedly exited with status 1. If you expect a non-zero exit status, use `When I try [...]`. Else, this may be a bug in your code or test. (RuntimeException)

@github-actions github-actions bot added the scope:testing Related to testing label Apr 15, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the wp-cli/wp-cli dependency from dev-main to a specific feature branch (dev-fix/harden-update) aliased as version 2.13.0, with corresponding updates to the composer.lock file. Feedback was provided regarding the use of a feature branch as a dependency, noting that it should be reverted to a stable version or the main branch once the fix is merged to prevent potential build failures if the branch is deleted.

Comment thread composer.json
@swissspidy swissspidy closed this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant