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

too short control escape #77

Closed
icberg7 opened this Issue Oct 23, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@icberg7

icberg7 commented Oct 23, 2015

I had Chef 12 working with Windows 2008 R2 the other week, but when I tried it again today, I receive this error while using test kitchen on two separate cookbooks:

       Recipe: minitest-handler::default
         * chef_gem[ci_reporter] action nothing (skipped due to action :nothing)
         * chef_gem[minitest] action nothing (skipped due to action :nothing)
         * chef_gem[minitest-chef-handler] action nothing (skipped due to action :nothing)
         * directory[delete minitest test location] action delete (up to date)

           - create new directory /var/chef/minitest


           ================================================================================
           Error executing action `run` on resource 'ruby_block[load_tests_and_register_handler]'
           ================================================================================

           RegexpError
           -----------
           too short control escape: /[A-Za-z]?:?C:\Users\CLOUD-~1\AppData\Local\Temp\kitchen\cache\/cookbooks\/icberg7_patch\//

           Resource Declaration:
           ---------------------
           # In C:/Users/CLOUD-~1/AppData/Local/Temp/kitchen/cache/cookbooks/minitest-handler/recipes/default.rb

            47: ruby_block 'load_tests_and_register_handler' do
            48:   block do
            49:     load_tests
            50:     register_handler
            51:   end
            52: end

           Compiled Resource:
           ------------------
           # Declared in C:/Users/CLOUD-~1/AppData/Local/Temp/kitchen/cache/cookbooks/minitest-handler/recipes/default.rb:47:in `from_file'

           ruby_block("load_tests_and_register_handler") do
             action [:run]
             retries 0
             retry_delay 2
             default_guard_interpreter :default
             block_name "load_tests_and_register_handler"
             declared_type :ruby_block
             cookbook_name "minitest-handler"
             recipe_name "default"
             block #<Proc:0x1ef9ae0@C:/Users/CLOUD-~1/AppData/Local/Temp/kitchen/cache/cookbooks/minitest-handler/recipes/default.rb:48>
           end

It looks like only part of the path is being escaped. This is using both chef 12.5.1 and 12.4.3.

@dpetzel dpetzel added the bug label Oct 25, 2015

@dpetzel dpetzel self-assigned this Oct 25, 2015

@dpetzel

This comment has been minimized.

Show comment
Hide comment
@dpetzel

dpetzel Oct 25, 2015

Collaborator

I'm able to repro this under 12.5.1 as well.

Collaborator

dpetzel commented Oct 25, 2015

I'm able to repro this under 12.5.1 as well.

@icberg7

This comment has been minimized.

Show comment
Hide comment
@icberg7

icberg7 Oct 25, 2015

OK, so at least I'm not crazy. Maybe a ruby version thing?

icberg7 commented Oct 25, 2015

OK, so at least I'm not crazy. Maybe a ruby version thing?

@dpetzel

This comment has been minimized.

Show comment
Hide comment
@dpetzel

dpetzel Oct 25, 2015

Collaborator

Doesn't appear to be the case, as I can repro on 11.x as well. It seems to be the way TK is constructing the cookbook path. Should have a fix a little later after a little more testing

Collaborator

dpetzel commented Oct 25, 2015

Doesn't appear to be the case, as I can repro on 11.x as well. It seems to be the way TK is constructing the cookbook path. Should have a fix a little later after a little more testing

@dpetzel dpetzel closed this in ff9c3b1 Oct 25, 2015

@dpetzel

This comment has been minimized.

Show comment
Hide comment
@dpetzel

dpetzel Oct 26, 2015

Collaborator

1.5.0 (just released) should take care of this.

Collaborator

dpetzel commented Oct 26, 2015

1.5.0 (just released) should take care of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment