platformsh / legacy-cli

This is the legacy version of Platform.sh's command-line interface. The new version is at: https://github.com/platformsh/cli
https://docs.platform.sh/administration/cli.html
MIT License
221 stars 120 forks source link

'platform build' fails locally for profiles with Drush <= 6.4 #402

Closed nvahalik closed 8 years ago

nvahalik commented 8 years ago

Working on an install profile and getting an error message when trying to build the profile locally. This doesn't happen when I push to the project remotely. It builds when pushing to Platform.sh.

~/Platform.sh/mmcp/repository$ platform build Building application php (runtime type: php:5.6) Beginning to build [ok] /Users/nvahalik/Platform.sh/mmcp/repository/project-core.make. drupal-7.41 downloaded. [ok] drupal patched with [ok] install-redirect-on-empty-database-728702-36.patch. Generated PATCHES.txt file for drupal [ok] Building the profile: mmcp Base path [error] /Users/nvahalik/Platform.sh/mmcp/builds/2015-12-21--12-00-13--master/public/profiles/mmcp already exists.

[Exception]
The command failed with the exit code: 1
Full command: '/Users/nvahalik/.composer/vendor/bin/drush' 'make' '--no-core' '--contrib-destination=.' '/Users/nvahalik/Platform.sh/mmcp/repository/project.make' '/Users/
nvahalik/Platform.sh/mmcp/builds/2015-12-21--12-00-13--master/public/profiles/mmcp' '--yes' '--cache-duration-releasexml=300' '--concurrency=4'

local:build [-a|--abslinks] [--source SOURCE] [--destination DESTINATION] [--copy] [--no-clean] [--no-archive] [--no-cache] [--no-build-hooks] [--working-copy] [--concurrency CONCURRENCY] [--lock] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [-y|--yes] [-n|--no] [-s|--shell] [--] []...

My repository is pretty sparse right now:

~/Platform.sh/mmcp/repository$ ls -al total 80 drwxr-xr-x 14 nvahalik staff 476 Dec 21 11:18 . drwxr-xr-x 8 nvahalik staff 272 Dec 21 09:21 .. drwxr-xr-x 16 nvahalik staff 544 Dec 21 12:06 .git drwxr-xr-x 4 nvahalik staff 136 Dec 21 09:20 .platform -rw-r--r-- 1 nvahalik staff 1641 Dec 21 09:20 .platform.app.yaml -rw-r--r-- 1 nvahalik staff 1558 Dec 21 09:20 README.md drwxr-xr-x 3 nvahalik staff 102 Dec 21 09:20 libraries -rw-r--r--@ 1 nvahalik staff 2152 Dec 21 11:46 mmcp.info -rw-r--r--@ 1 nvahalik staff 14304 Dec 21 12:05 mmcp.install -rw-r--r--@ 1 nvahalik staff 955 Dec 21 11:10 mmcp.profile drwxr-xr-x 3 nvahalik staff 102 Dec 21 09:20 modules -rw-r--r--@ 1 nvahalik staff 196 Dec 21 11:39 project-core.make -rw-r--r--@ 1 nvahalik staff 3975 Dec 21 11:58 project.make drwxr-xr-x 3 nvahalik staff 102 Dec 21 09:20 themes

ralt commented 8 years ago

What's your CLI version?

nvahalik commented 8 years ago

@ralt, I was using v2.8.3 but I tried again with v2.10.0 and encountered the same issue.

pjcdawkins commented 8 years ago

Could you try with v2.7.1 (here's the platform.phar file)? I suspect this commit could be the reason: https://github.com/platformsh/platformsh-cli/commit/d6bb673088526a774aa6ab26b728153dc6172ee5

pjcdawkins commented 8 years ago

Also, what is your Drush version?

I've tried the project, and it builds fine for me with Drush 6, Drush 7, and Drush 8 (all with CLI 2.10.0).

nvahalik commented 8 years ago

I am using Drush v6.2.0. Using the provided .phar file (v2.7.1), I did not have any errors when building the site.

pjcdawkins commented 8 years ago

OK, I've reproduced this with Drush <= 6.4, but it's fixed from 6.5 onwards (by this PR).

I can work on a backwards compatibility fix for the CLI.

pjcdawkins commented 8 years ago

Fixed in v2.10.1