Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

name : Does not match the regex pattern #14

Open
caryp opened this issue Dec 15, 2020 · 1 comment · May be fixed by #15
Open

name : Does not match the regex pattern #14

caryp opened this issue Dec 15, 2020 · 1 comment · May be fixed by #15

Comments

@caryp
Copy link

caryp commented Dec 15, 2020

It seems like the schema for the composer.json file has changed and now requires a leading vendor-name/ (see https://getcomposer.org/schema.json)

Without it you will see this error:

==> default:     ================================================================================
==> default:     Error executing action `run` on resource 'execute[phpcs-composer]'
==> default:     ================================================================================
==> default:
==> default:     Mixlib::ShellOut::ShellCommandFailed
==> default:     ------------------------------------
==> default:     Expected process to exit with [0], but received '1'
==> default:     ---- Begin output of composer update ----
==> default:     STDOUT:
==> default:     STDERR: [Composer\Json\JsonValidationException]
==> default:       "./composer.json" does not match the expected JSON schema:
==> default:        - name : Does not match the regex pattern ^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$
==> default:     ---- End output of composer update ----
==> default:     Ran composer update returned 1
==> default:
==> default:     Resource Declaration:
==> default:     ---------------------
==> default:     # In /var/chef/cache/cookbooks/phpcs/recipes/composer.rb
==> default:
==> default:      39: execute "phpcs-composer" do
==> default:      40: 	user "root"
==> default:      41: 	cwd phpcs_dir
==> default:      42: 	command "composer update"
==> default:      43: 	action :run
==> default:      44: end
==> default:
==> default:     Compiled Resource:
==> default:     ------------------
==> default:     # Declared in /var/chef/cache/cookbooks/phpcs/recipes/composer.rb:39:in `from_file'
==> default:
==> default:     execute("phpcs-composer") do
==> default:       action [:run]
==> default:       retries 0
==> default:       retry_delay 2
==> default:       default_guard_interpreter :execute
==> default:       command "composer update"
==> default:       backup 5
==> default:       cwd "/var/chef/cache/phpcs"
==> default:       returns 0
==> default:       user "root"
==> default:       declared_type :execute
==> default:       cookbook_name "phpcs"
==> default:       recipe_name "composer"
==> default:     end
==> default:
==> default:     System Info:
==> default:     ------------
==> default:     chef_version=12.21.31
==> default:     platform=centos
==> default:     platform_version=7.9.2009
==> default:     ruby=ruby 2.3.5p376 (2017-09-14 revision 59905) [x86_64-linux]
==> default:     program_name=chef-client worker: ppid=32737;start=22:51:39;
==> default:     executable=/opt/chefdk/bin/chef-client
@caryp
Copy link
Author

caryp commented Dec 15, 2020

I am testing fix now and will make PR

@caryp caryp linked a pull request Dec 16, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant