When running an export into CSV using drush, it wont export my image urls as absolutes paths, but when I run it with batch it does. (See attached files)
Any clues why it behaves like that, I really need to do this using drush.

Thankful for help

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xamanu’s picture

Title: Absolute paths does not work on my drush? » Support absolute paths in drush output_file argument
Version: 7.x-3.0-beta6 » 7.x-3.x-dev
Component: User interface » Code
Category: task » feature
Status: Active » Needs review
FileSize
620 bytes

The problem is that when using absolute paths the current position is getting popped to the front:

'output_file' => realpath(drush_get_context('DRUSH_OLDCWD', getcwd())) . '/' . $output_file,

Attacjed you can find a patch that makes it just simpler, codewise, and should work. Please review if this would not cause other problems.

xamanu’s picture

With some further testing I had problems to create files which did not exist before. So here a new patch.

junedkazi’s picture

Status: Needs review » Closed (duplicate)

This issue is not with views data export drush. Please refer to this issue #743368: $GLOBAL['base_url'] set to http://default. The solution should be in your drush command pass the site url using the -l or --uri param.