Merge pull request #2134 from szeck87/docker-fix
Fix php-cs-fixer not running from phar files
This commit is contained in:
commit
cfc7b86737
|
@ -66,7 +66,7 @@ before_install:
|
|||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
curl https://nixos.org/nix/install | sh &&
|
||||
. ~/.nix-profile/etc/profile.d/nix.sh &&
|
||||
nix-env -i uncrustify R elm-format terraform atom atom-beta opam &&
|
||||
nix-env -i uncrustify R elm-format terraform atom atom-beta &&
|
||||
pip install --user -r requirements.txt;
|
||||
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
brew update && brew cask zap oclint && brew bundle &&
|
||||
|
|
2
Brewfile
2
Brewfile
|
@ -1,9 +1,7 @@
|
|||
tap 'homebrew/php'
|
||||
tap 'caskroom/versions'
|
||||
brew 'uncrustify'
|
||||
brew 'r'
|
||||
brew 'composer'
|
||||
brew 'opam'
|
||||
brew 'crystal-lang'
|
||||
brew 'terraform'
|
||||
brew 'elm-format'
|
||||
|
|
|
@ -389,6 +389,9 @@ class HybridExecutable extends Executable
|
|||
installedWithDocker: false
|
||||
init: () ->
|
||||
super()
|
||||
.then(() =>
|
||||
return @
|
||||
)
|
||||
.catch((error) =>
|
||||
return Promise.reject(error) if not @docker?
|
||||
return @
|
||||
|
@ -400,6 +403,13 @@ class HybridExecutable extends Executable
|
|||
return @initDocker()
|
||||
return @
|
||||
)
|
||||
.catch((error) =>
|
||||
if not @.required
|
||||
@verbose("Not required")
|
||||
@
|
||||
else
|
||||
Promise.reject(error)
|
||||
)
|
||||
|
||||
initDocker: () ->
|
||||
@docker.init()
|
||||
|
@ -409,7 +419,7 @@ class HybridExecutable extends Executable
|
|||
.then(=> @)
|
||||
.catch((dockerError) =>
|
||||
@debug(dockerError)
|
||||
Promise.reject(error)
|
||||
Promise.reject(dockerError)
|
||||
)
|
||||
|
||||
run: (args, options = {}) ->
|
||||
|
|
|
@ -67,7 +67,8 @@ module.exports = class PHPCSFixer extends Beautifier
|
|||
phpCsFixerOptions = [
|
||||
"fix"
|
||||
"--rules=#{options.rules}" if options.rules
|
||||
"--config=#{options.cs_fixer_config_file}" if options.cs_fixer_config_file
|
||||
"--config" if options.cs_fixer_config_file
|
||||
"#{options.cs_fixer_config_file}" if options.cs_fixer_config_file
|
||||
"--allow-risky=#{options.allow_risky}" if options.allow_risky
|
||||
"--using-cache=no"
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue