Skip to content
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

If WP-CLI argument '--allow-root' is set, CLI isn't working #48

Closed
4 tasks done
dsturm opened this issue Jan 30, 2020 · 3 comments · Fixed by #56 or #94
Closed
4 tasks done

If WP-CLI argument '--allow-root' is set, CLI isn't working #48

dsturm opened this issue Jan 30, 2020 · 3 comments · Fixed by #56 or #94
Assignees
Labels
bug Something isn't working

Comments

@dsturm
Copy link
Contributor

dsturm commented Jan 30, 2020

Description

This might be an edge case, but I thought it should be mentioned: While developing in an Local by Flywheel (3.3.0) environment, the wp acorn command(s) resulted in Command "acorn" is not defined.. This came from the fact that wp is aliased to wp --allow-root in this env.

Steps to reproduce

  1. Spin up site in Local by Flywheel
  2. Install Sage 10
  3. Run wp acorn

Expected behavior:
Lists all registered CLI commands for acorn.

Actual behavior:
Throws error Command "acorn" is not defined..

Reproduces how often:
100%

Versions

"roots/sage": "10.0.0-dev"
"roots/acorn": "dev-master" (58ec37c)

Additional information

As said, Local by Flywheel sets alias wp="wp --allow-root".

@Log1x
Copy link
Member

Log1x commented Jan 30, 2020

I heavily recommend not using --allow-root for obvious reasons, but outside of that– we will need to adjust how we're handling argv when registering the CLI.

@alantaylordesign
Copy link

Hi. It looks like this issue crept back in with version 1.0.6. I'm trying to run wp --allow-root acorn view:cache as part of a build script, but get the error Command "acorn" is not defined.. I downgraded to 1.0.5 and verified it was working as recently as that version.

@Log1x Log1x reopened this Jul 8, 2020
@Log1x Log1x added the bug Something isn't working label Jul 8, 2020
@Log1x Log1x self-assigned this Jul 8, 2020
@Jamiewarb
Copy link

Jamiewarb commented Feb 17, 2021

I'm running Kinsta's new DevKinsta tool locally, and it seems that currently it's not possible to run wp as anything other than root. This makes DevKinsta and Acorn incompatible right now.

Seems like they've made the same choice as Local.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants