CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 03:10:24 GMT
content-type: text/html; charset=utf-8
cache-control: no-cache
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
referrer-policy: no-referrer-when-downgrade
server-timing: pull_request_layout-fragment;desc="pull_request_layout fragment";dur=388.898791,conversation_content-fragment;desc="conversation_content fragment";dur=698.160597,conversation_sidebar-fragment;desc="conversation_sidebar fragment";dur=387.910124,nginx;desc="NGINX";dur=1.44189,glb;desc="GLB";dur=139.498849
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: aab62e3
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=%2FKOkxRhQf6PJvTRhlRY0lWj0tHY4LnzfZHFLhFKkg3c%2FupQ%2FR4k6MaZ6K9tXcYE5uxkpp%2FGOGxJcPytKktOzwUulLN8VZZMd5XYf8knl1pmT3j2MjtD%2B1%2BjZSwJXuxc%2FoAoJdk%2BGqhITMbRyXP20izW4iKk8vbbBsnodZA4rTL%2FP8nm1otzEWq2ZndQCFf6LBgCjNlcL9QLGWFha3biXASokR3WKTn%2FDORwKICyJi9SjE6uKI%2FrltXhowG%2BfpihQpFBfIRmtnTJxMA5TDol7Tg%3D%3D--623sNlBzQjkfbKpK--9FagaRcFgUsD94VThsAnJg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.790603675.1760152224; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 03:10:24 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 03:10:24 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: B538:AD439:23F195:34ED7A:68E9CA9F
Properly create missing wp cli config file when needed. by mrsdizzie · Pull Request #6062 · wp-cli/wp-cli · GitHub
mrsdizzie
force-pushed
the
fix-missing-config
branch
from
March 14, 2025 15:13
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1k
Properly create missing wp cli config file when needed. #6062
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
Our default config file includes a path that also might not exist. Touch can't create paths, so this silently fails in the one situation you want it to work (when the user hasn't already created the folder). Instead we check if the directory exists first and if not create it. Then we use the build in touch rather than running an external command.
The DocBlock for this function says this should return sring or false but find_file_upward actually returns null when no file is found. This was causing a problem later on because you can't give Spyc::YAMLLoad() a null variable. ``` PHP 15. Mustangostang\Spyc::YAMLLoad($input = NULL) /Users/isla/source/wp-cli-dev/wp-cli/php/commands/src/CLI_Alias_Command.php:358 PHP 16. Mustangostang\Spyc->_load($input = NULL) /Users/isla/source/wp-cli-dev/spyc/src/Spyc.php:118 PHP 17. Mustangostang\Spyc->loadFromSource($input = NULL) /Users/isla/source/wp-cli-dev/spyc/src/Spyc.php:440 PHP 18. Mustangostang\Spyc->loadFromString($input = NULL) /Users/isla/source/wp-cli-dev/spyc/src/Spyc.php:512 PHP 19. explode($separator = '\n', $string = NULL) /Users/isla/source/wp-cli-dev/spyc/src/Spyc.php:516 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /Users/isla/source/wp-cli-dev/spyc/src/Spyc.php on line 516 ```
Also fix logging
Need to add an extra debug statement when creating a config file because the existing debug details get overwritten and it only prints the last one
To see if this solves current CI problems
3fc5d8d
to
172ac4f
Compare
swissspidy
approved these changes
Mar 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
You can’t perform that action at this time.
While looking into #6053 I saw two bugs:
The first is that we called
touch
to create a config file if it wasn't present. That doesn't work because touch can't create the parent folders when they don't exist.The only user of this code is the
alias add
command which I then saw had another bug. The function for getting the path of a project config file returnednull
when it couldn't find one instead offalse
as the docblock says it should. This caused a warning later on: