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

Auto-create directory structure for output file #16

Closed
AMeng opened this issue Dec 22, 2014 · 1 comment
Closed

Auto-create directory structure for output file #16

AMeng opened this issue Dec 22, 2014 · 1 comment

Comments

@AMeng
Copy link
Owner

AMeng commented Dec 22, 2014

If you specify an output file to a directory that does not exist, a Ruby error is raised.

$ chefspec-bootstrap recipe.rb -o a/b/c/d.txt
/chefspec-bootstrap/lib/chefspec-bootstrap.rb:61:in `initialize': No such file or directory - a/b/c/d.txt (Errno::ENOENT)
    from /chefspec-bootstrap/lib/chefspec-bootstrap.rb:61:in `open'
    from /chefspec-bootstrap/lib/chefspec-bootstrap.rb:61:in `generate'
    from /chefspec-bootstrap/bin/chefspec-bootstrap:35:in `<top (required)>'
    from /.rvm/gems/ruby-1.9.3-p429/bin/chefspec-bootstrap:19:in `load'
    from /.rvm/gems/ruby-1.9.3-p429/bin/chefspec-bootstrap:19:in `<main>'
    from /.rvm/gems/ruby-1.9.3-p429/bin/ruby_noexec_wrapper:14:in `eval'
    from /.rvm/gems/ruby-1.9.3-p429/bin/ruby_noexec_wrapper:14:in `<main>'

The directories should be auto-created if they do not exist.

@AMeng
Copy link
Owner Author

AMeng commented Dec 23, 2014

Fixed in #17

@AMeng AMeng closed this as completed Dec 23, 2014
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

No branches or pull requests

1 participant