As noted in #2625846-28: Run drush export commands as customized user the recently added run-as option is equivalent to using the drush --user option when executing the commands.

To recap, this command:
drush --user=1 default-content-export-references user --folder=$PWD/content_as_user_1
produces basically the same output of:
drush default-content-export-references user --run-as=1 --folder=$PWD/content_run_as_user_1

So I would propose to remove the run-as option, and document a little better that the more general --user option can be used.

If this sounds OK I can prepare a patch.

After that is done we could discuss if running the commands as user 1 by default makes sense.

Thanks,
Antonio

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ao2 created an issue. See original summary.

AaronBauman’s picture

I introduced the run-as option, not realizing the global --user flag was available.
I can confirm that --user=1 has the same behavior, so run-as should be removed.

andypost’s picture

it needs patch, and I'd like to rollback

MerryHamster’s picture

Patch

MerryHamster’s picture

Status: Active » Needs review
AaronBauman’s picture

Status: Needs review » Needs work

Thanks for the patch MerryHamster
The task is to remove the "run-as" option entirely, as well as removing the setup and teardown functions.

Rolling back all the way prior to https://www.drupal.org/node/2625846#comment-11878807
ie. http://cgit.drupalcode.org/default_content/commit/?id=11fa548

AaronBauman’s picture

Status: Needs work » Needs review
FileSize
3.59 KB
andypost’s picture

Status: Needs review » Reviewed & tested by the community

Thanx, gonna commit this soon

  • andypost committed 2c9aad8 on 8.x-1.x authored by aaronbauman
    Issue #2857589 by aaronbauman, MerryHamster: Remove the run-as option in...
andypost’s picture

Status: Reviewed & tested by the community » Fixed

Thanx, now we can proceed with split

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.