drush @slice st --simulate still performs the remote command despite simulate mode. @slice has a remote host.

Comments

greg.1.anderson’s picture

So, do you think that --simulate with a remote host should print out the ssh command but not run it, or should it run the remote drush command and pass through the --simulate flag?

greg.1.anderson’s picture

The former is safer, of course.

moshe weitzman’s picture

Priority: Critical » Normal

Good question. Both are useful. For the near term, I think --simulate should not issue the ssh command. Looks like this never worked as I describe so lowering priority.

Them, I'm interested in a --backend-simulate which is only in effect when --backend is in effect. Perhaps should apply to any option, not just simulate.

greg.1.anderson’s picture

So in other words, --backend-* does nothing, but backend_invoke will find all of the --backend-*=value options and turn them into --*=value when it calls through? That's easy enough.

moshe weitzman’s picture

Title: --simulate does nothing for remote dispatches » --simulate does nothing for remote dispatches. And add --backend-foo for sending options just to remote system.
Category: bug » feature

I committed a fix so that --simulate does not remote dispatch during --simulate. Leaving open for the --backend-foo feature.

I have turned back on the 'Remove trailing whitespace' feature on my editor so lots of unimportant diffs in the commit. I encourage all contributors to use this setting if you have it. We'll have the codebase cleaned up again in no time.

greg.1.anderson’s picture

I didn't like #5 because it interferes with drush sql-sync -s @from @to. I committed an adjustment to allow calls to override --simulate mode if they are making read-only calls (e.g. to fetch db info).

http://drupal.org/cvs?commit=494604

moshe weitzman’s picture

Thanks for doing this. It has been annoying me too. I may add a couple more overrides as they arise.

greg.1.anderson’s picture

Status: Active » Fixed

I think this (remote --simulated) is basically fixed now. --backend-foo is not implemented, but I have not found any need for that. Re-open if you think it's important.

Status: Fixed » Closed (fixed)

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