René's URL Explorer Experiment


Title: Shell binary not getting detected correctly? · Issue #66 · wp-cli/shell-command · GitHub

Open Graph Title: Shell binary not getting detected correctly? · Issue #66 · wp-cli/shell-command

X Title: Shell binary not getting detected correctly? · Issue #66 · wp-cli/shell-command

Description: Bug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. The shell binary '/bin/bash' is not valid. The wp --info command shows the correct Shell, but wp...

Open Graph Description: Bug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. The shell binary '/bin/bash' is not valid. The wp --info...

X Description: Bug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. The shell binary '/bin/bash' is not valid. The w...

Opengraph URL: https://github.com/wp-cli/shell-command/issues/66

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Shell binary not getting detected correctly?","articleBody":"## Bug Report\r\n\r\n- [x] Yes, I reviewed the [contribution guidelines](https://make.wordpress.org/cli/handbook/contributing/).\r\n- [x] Yes, more specifically, I reviewed the guidelines on [how to write clear bug reports](https://make.wordpress.org/cli/handbook/bug-reports/).\r\n\r\n**The shell binary '/bin/bash' is not valid.**\r\n\r\nThe `wp --info` command shows the correct `Shell`, but `wp shell` does not seem to find it. Since it's not in `/bin/bash`\r\n\r\n```\r\n[sergio@samara:/var/www/nerdpress]$ wp --info\r\nOS:     Linux 6.6.32 #1-NixOS SMP PREEMPT_DYNAMIC Sat May 25 14:22:56 UTC 2024 x86_64\r\nShell:  /run/current-system/sw/bin/bash\r\nPHP binary:     /nix/store/swkmyv7mplz46vlr9jyk7qlp2lxv19z0-php-with-extensions-8.2.19/bin/php\r\nPHP version:    8.2.19\r\nphp.ini used:   /nix/store/6g69kphwfkdx4p2qn1fgwm888l15cpz7-wp-cli-2.10.0/etc/php.ini\r\nMySQL binary:   /run/current-system/sw/bin/mysql\r\nMySQL version:  mysql  Ver 15.1 Distrib 10.11.6-MariaDB, for Linux (x86_64) using readline 5.1\r\nSQL modes:      STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION\r\nWP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli\r\nWP-CLI vendor dir:      phar://wp-cli.phar/vendor\r\nWP_CLI phar path:       /var/www/nerdpress\r\nWP-CLI packages dir:\r\nWP-CLI cache dir:       $XDG_CACHE_HOME/wp-cli\r\nWP-CLI global config:\r\nWP-CLI project config:\r\nWP-CLI version: 2.10.0\r\n\r\n[sergio@samara:/var/www/nerdpress]$ wp shell\r\nError: The shell binary '/bin/bash' is not valid. You can override the shell to be used through the WP_CLI_CUSTOM_SHELL environment variable.\r\n\r\n[sergio@samara:/var/www/nerdpress]$ php -a\r\nInteractive shell\r\n\r\nphp > var_dump( is_file( '/run/current-system/sw/bin/bash' ) );\r\nbool(true)\r\nphp > var_dump( is_readable( '/run/current-system/sw/bin/bash' ) );\r\nbool(true)\r\nphp > exit\r\n```\r\n\r\n**Describe how other contributors can replicate this bug**\r\n\r\n- Have `get( 'SHELL' );` return something other than `/bin/bash`\r\n- Run `wp shell`\r\n\r\n\r\n**Provide a possible solution**\r\n\r\nSeems that the `wp cli info` command gets the shell binary using:\r\n[`getenv( 'SHELL' )`](https://github.com/wp-cli/wp-cli/blob/0ca6d920123ac904c918d69181edc5071dc92c9d/php/commands/src/CLI_Command.php#L126C12-L126C29)\r\n\r\nWhere `wp shell` [uses `getenv( 'WP_CLI_CUSTOM_SHELL' )` to check for a \"custom shell\", then assumes `/bin/bash` is it isn't set](https://github.com/wp-cli/shell-command/blob/main/src/WP_CLI/Shell/REPL.php#L118).\r\n\r\n[Why not use `$shell_binary = getenv( 'SHELL' );` instead of `$shell_binary = '/bin/bash';`](https://github.com/wp-cli/shell-command/blob/main/src/WP_CLI/Shell/REPL.php#L121C4-L121C32)\r\n\r\n","author":{"url":"https://github.com/ecotechie","@type":"Person","name":"ecotechie"},"datePublished":"2024-07-10T19:08:48Z","url":"https://github.com/wp-cli/shell-command/issues/66"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7d0685b4-36ba-f774-71b1-0733663f97ff
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAD5A:258059:134DB27:1AFE4AD:6AFA23FB
html-safe-nonce656d224e420ef61bd1696c7bd2bf639740e72b2531ab40087daf307b1a4d3aa6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDVBOjI1ODA1OToxMzREQjI3OjFBRkU0QUQ6NkFGQTIzRkIiLCJ2aXNpdG9yX2lkIjoiMTg3ODQ1MDk3MDAwMjMzNDcxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac713d1854dcf2e4fede692920bb65d7c164618070fc3bd1c1da532654ba73c12e
hovercard-subject-tagissue:2401467036
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/wp-cli/shell-command/66/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3a5cf8899f7cb6f1aaa5a145f7c83e71323c62770c22bbae2c44ecf5ad1f5b7a/wp-cli/shell-command/issues/66
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3a5cf8899f7cb6f1aaa5a145f7c83e71323c62770c22bbae2c44ecf5ad1f5b7a/wp-cli/shell-command/issues/66
og:image:altBug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. The shell binary '/bin/bash' is not valid. The wp --info...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameecotechie
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
go-importgithub.com/wp-cli/shell-command git https://github.com/wp-cli/shell-command.git
octolytics-dimension-user_id1570774
octolytics-dimension-user_loginwp-cli
octolytics-dimension-repository_id85307675
octolytics-dimension-repository_nwowp-cli/shell-command
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id85307675
octolytics-dimension-repository_network_root_nwowp-cli/shell-command
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/wp-cli/shell-command/issues/66#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fwp-cli%2Fshell-command%2Fissues%2F66
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fwp-cli%2Fshell-command%2Fissues%2F66
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=wp-cli%2Fshell-command
Reloadhttps://github.com/wp-cli/shell-command/issues/66
Reloadhttps://github.com/wp-cli/shell-command/issues/66
Reloadhttps://github.com/wp-cli/shell-command/issues/66
wp-clihttps://github.com/wp-cli
shell-commandhttps://github.com/wp-cli/shell-command
Codehttps://github.com/wp-cli/shell-command
Issueshttps://github.com/wp-cli/shell-command/issues
Pull requestshttps://github.com/wp-cli/shell-command/pulls
Actionshttps://github.com/wp-cli/shell-command/actions
Security and qualityhttps://github.com/wp-cli/shell-command/security
Insightshttps://github.com/wp-cli/shell-command/pulse
https://github.com/wp-cli/shell-command
New issuehttps://github.com/login?return_to=https://github.com/wp-cli/shell-command/issues/66
New issuehttps://github.com/login?return_to=https://github.com/wp-cli/shell-command/issues/66
#81https://github.com/wp-cli/shell-command/pull/81
Shell binary not getting detected correctly?https://github.com/wp-cli/shell-command/issues/66#top
#81https://github.com/wp-cli/shell-command/pull/81
https://github.com/swissspidy
https://github.com/copilot-swe-agent
command:shellRelated to 'shell' commandhttps://github.com/wp-cli/shell-command/issues?q=state%3Aopen%20label%3A%22command%3Ashell%22
https://github.com/ecotechie
ecotechiehttps://github.com/ecotechie
on Jul 10, 2024https://github.com/wp-cli/shell-command/issues/66#issue-2401467036
contribution guidelineshttps://make.wordpress.org/cli/handbook/contributing/
how to write clear bug reportshttps://make.wordpress.org/cli/handbook/bug-reports/
getenv( 'SHELL' )https://github.com/wp-cli/wp-cli/blob/0ca6d920123ac904c918d69181edc5071dc92c9d/php/commands/src/CLI_Command.php#L126C12-L126C29
uses getenv( 'WP_CLI_CUSTOM_SHELL' ) to check for a "custom shell", then assumes /bin/bash is it isn't sethttps://github.com/wp-cli/shell-command/blob/main/src/WP_CLI/Shell/REPL.php#L118
Why not use $shell_binary = getenv( 'SHELL' ); instead of $shell_binary = '/bin/bash';https://github.com/wp-cli/shell-command/blob/main/src/WP_CLI/Shell/REPL.php#L121C4-L121C32
https://github.com/ecotechie
ecotechiehttps://github.com/ecotechie
on Jul 10, 2024https://github.com/wp-cli/shell-command/issues/66#issuecomment-2221243460
https://github.com/swissspidy
swissspidyhttps://github.com/swissspidy
on Jul 11, 2024https://github.com/wp-cli/shell-command/issues/66#issuecomment-2222199012
https://github.com/ecotechie
ecotechiehttps://github.com/ecotechie
on Jul 12, 2024https://github.com/wp-cli/shell-command/issues/66#issuecomment-2226095025
https://github.com/swissspidy
swissspidyhttps://github.com/swissspidy
on Jul 14, 2024https://github.com/wp-cli/shell-command/issues/66#issuecomment-2227231667
@schlesserahttps://github.com/schlessera
@danielbachhuberhttps://github.com/danielbachhuber
https://github.com/danielbachhuber
danielbachhuberhttps://github.com/danielbachhuber
on Jul 17, 2024https://github.com/wp-cli/shell-command/issues/66#issuecomment-2233227418
https://github.com/ecotechie
ecotechiehttps://github.com/ecotechie
on Jul 24, 2024https://github.com/wp-cli/shell-command/issues/66#issuecomment-2246825411
bc13226https://github.com/wp-cli/shell-command/commit/bc1322633260db7cf7179f9e1147d4c9ad563658
swissspidyhttps://github.com/swissspidy
command:shellRelated to 'shell' commandhttps://github.com/wp-cli/shell-command/issues?q=state%3Aopen%20label%3A%22command%3Ashell%22
on Nov 3, 2025https://github.com/wp-cli/shell-command/issues/66#event-20669793292
swissspidyhttps://github.com/swissspidy
Copilothttps://github.com/apps/copilot-swe-agent
swissspidyhttps://github.com/swissspidy
on Feb 1, 2026https://github.com/wp-cli/shell-command/issues/66#event-22447581130
swissspidyhttps://github.com/swissspidy
completedhttps://github.com/wp-cli/shell-command/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#81https://github.com/wp-cli/shell-command/pull/81
on Mar 10, 2026https://github.com/wp-cli/shell-command/issues/66#event-23444749792
Sign up for freehttps://github.com/signup?return_to=https://github.com/wp-cli/shell-command/issues/66
Sign in to commenthttps://github.com/login?return_to=https://github.com/wp-cli/shell-command/issues/66
Copilothttps://github.com/apps/copilot-swe-agent
swissspidyhttps://github.com/swissspidy
command:shellRelated to 'shell' commandhttps://github.com/wp-cli/shell-command/issues?q=state%3Aopen%20label%3A%22command%3Ashell%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.