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

handle if box path contains space character #3306

Closed
wants to merge 1 commit into from
Closed

handle if box path contains space character #3306

wants to merge 1 commit into from

Conversation

novalagung
Copy link

if I use box from my local computer that placed inner folder with name contains space characters, this error showing up

novalagung@dreambender:~/Documents$ vagrant box add some\ path\ \ with\ space/ubuntu1204.box

/opt/vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:176:in `split': bad URI(is not URI?): 
file:///home/novalagung/Documents/some path  with space/ubuntu1204.box (URI::InvalidURIError)
    from /opt/vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:211:in `parse'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:747:in `parse'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/box_add.rb:448:in `metadata_url?'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/box_add.rb:76:in `block in call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/box_add.rb:74:in `map'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/box_add.rb:74:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/commands/box/command/add.rb:77:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/commands/box/command/root.rb:61:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/environment.rb:248:in `cli'
    from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.5.1/bin/vagrant:158:in `<main>'

so, I add some code to handler this error

@mitchellh
Copy link
Contributor

Thanks! I fixed this higher up in a better place.

@mitchellh mitchellh closed this Apr 2, 2014
@ghost ghost locked and limited conversation to collaborators Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants