Drupal - Is it possible to download sandbox projects with Drush?

It's possible to download sandbox project with drush using make file.

Here is example.make file:

core = 7.x
api = 2
; Sandbox module
projects[range_field][type] = module
projects[range_field][download][type] = git
projects[range_field][download][branch] = "7.x-1.x"
projects[range_field][download][url] = http://git.drupal.org/sandbox/Taran2L/1848632.git
projects[range_field][download][revision] = a1cc04da3c1dd957e6808b7e6a381c5970904863

Then you can execute it via:

drush make --no-core example.make # optional options are: -y --working-copy --no-gitinfofile --verbose

I do believe you're stuck with git for this one. Drush requires the use of a module name, even when fetching with git (drush dl --package-handler=git_drupalorg), and sandbox projects don't have module names.

Drush also requires you to download a release of a module. Sandbox projects have no releases. This may also just be by design, since using sandbox modules can be dangerous, and is made difficult on purpose.

You could slightly automate it with a git alias. You could set up something like:

git dl-sb username/number project_name

This would just do git clone http://git.drupal.org/sandbox/username/number.git project_name

You could also write a drush command that would do the same thing, though it would be a weird drush command...

Tags:

Drush