Comments (4)
@grafikchaos Thanks for the detailed error report! To work on this, I'm going to need some more information if you're able to get it for me.
Can you tell me what OS you're running on the target machine, what version of php you're using, what version of ruby is running on the machine you're deploying from and also send me the contents of log/capistrano.log
around the version call?
Also, can you run the following command on the same machine you are deploying from and tell me what it outputs?
ruby -e 'puts Gem::Version::new("2.1.5")'
I can't reproduce the issue, and haven't seen it on any of our deployments, so I'm hoping this will help me get somewhere. I'm also a bit perplexed with the regex \e\[(\d+)m
as it is matching on a shell escape sequence, but it's not accounting for the period in the version number, which means the version number it returns is going to be inaccurate. So I need to figure out first how to reproduce the issue so I can verify a solution.
from capistrano-magento2.
The only thing that seems to make sense is a hidden character that formats the version number in yellow (see screenshot). Every time I tried debugging the version number in a ruby shell I never had a problem, only when it was dynamically captured with colored output.
Also, can you run the following command on the same machine you are deploying from and tell me what it outputs?
ruby -e 'puts Gem::Version::new("2.1.5")'
2.1.5
Remote target environment:
- os: CentOS release 6.8 (Final)
- php: PHP 7.0.15
- shell:
bash
PHP 7.0.15 (cli) (built: Jan 23 2017 15:57:44) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.15, Copyright (c) 1999-2017, by Zend Technologies
Local machine for deployments:
- os: macOS Sierra 10.12.3
- ruby: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin16.0] (installed via rbenv)
- shell:
zsh
Local Gems
Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
gem 'capistrano-magento2', "0.6.0"# github: 'augustash/capistrano-magento2', branch: "hotfix/pr64-fix-version-comparison"
gem "airbrussh", :require => false
Installed gems
gem list -d airbrussh develop
*** LOCAL GEMS ***
airbrussh (1.1.2, 1.1.1, 1.0.0, 0.8.0)
Author: Matt Brictson
Homepage: https://github.com/mattbrictson/airbrussh
License: MIT
Installed at (1.1.2): /usr/local/opt/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0
(1.1.1): /usr/local/opt/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0
(1.0.0): /usr/local/opt/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0
(0.8.0): /usr/local/opt/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0
Airbrussh pretties up your SSHKit and Capistrano output
capistrano.log
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
DEBUG [db1deae7] Running /usr/bin/env php -f /home/mastersu/master-supplements.com/staging/releases/20170329195018/bin/magento -- -V as [email protected]
DEBUG [db1deae7] Command: cd /home/mastersu/master-supplements.com/staging/releases/20170329195018 && ( export PATH="/opt/nexcess/php70u/root/usr/bin/:$PATH" ; /usr/bin/env php -f /home/mastersu/master-supplements.com/staging/releases/20170329195018/bin/magento -- -V )
DEBUG [db1deae7] Magento CLI version 2.1.5
from capistrano-magento2.
Thank you so much for the completeness of your response!
The only thing that seems to make sense is a hidden character that formats the version number in yellow (see screenshot).
You are spot on with this! Crazy thing is, ansi output shouldn't turn up in non-interactive shells, but I'm pretty sure that's what's causing this.
I've pushed a commit to develop which should solve this. In short, I added --no-ansi
to the bin/magento
call. You can see the difference it makes:
If you can test this fix and confirm that it solves the issue, I'll tag a new release and push it up ASAP.
from capistrano-magento2.
I went ahead and released version 0.6.1 which has my fix. If the issue persists, feel free to re-open the task so we can get a better solution in place. Thanks again for the report!
from capistrano-magento2.
Related Issues (20)
- Version dependencies for capistrano HOT 5
- Do not run show pending updates when capistrano is outside magento git repo HOT 1
- var/reports HOT 2
- Can't install 'capistrano/magento2/cachetool' HOT 2
- [enhancement] Deploy on multiple fronts without recompiling everything on each machine HOT 2
- Catalog product images in production mode delete after deploy HOT 1
- Cached data from current release causes new release to fail with redis caching HOT 6
- Change default path of Composer HOT 2
- Magento still has issues with /pub in sitemap HOT 1
- Change deployment order of DI compile and schema upgrade HOT 2
- Problem with deploy after updated module with SFTP error in setup:di:compile step HOT 5
- Doesn't work with PHP 7.4 and Magento 2..42 HOT 4
- When execute command cap staging deploy
- Issue: Cached metadata/generated files HOT 7
- How to handle initial setup:install HOT 1
- How can I flush cache file on multi server HOT 1
- touch: cannot touch '/var/www/html/releases/20220809134142/pub/static/deployed_version.txt' No such file or directory HOT 1
- Suggestion: Add arbitrary composer_flags or option to run composer with --no-plugins HOT 1
- Capistrano version
- Support for Quality Patches Tool
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capistrano-magento2.