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

Vagrant requires also to scape slashes #253

Merged
merged 2 commits into from
Dec 5, 2016

Conversation

afiune
Copy link

@afiune afiune commented Nov 30, 2016

We need to scape the back slashes in Ruby but also Vagrant requires to
scape them. So we need to double scape!

Signed-off-by: Salim Afiune [email protected]

@coderanger
Copy link
Contributor

Better fix is probably to use .inspect in the Vagrantfile template.

@afiune
Copy link
Author

afiune commented Nov 30, 2016

I caught this last issue when I was testing the gem for the Release!! Now I am sure this works all the way:

       Finished converging <win-windows-7> (2m30.00s).
-----> Setting up <win-windows-7>...
       Finished setting up <win-windows-7> (0m0.00s).
-----> Kitchen is finished. (4m15.94s)```

@coderanger
Copy link
Contributor

Specifically here

c.vm.synced_folder "<%= source %>", "<%= destination %>", <%= options %>

Rather than "<%= whatever %>" we can do <%= whatever.inspect %>. That will handle quoting, escaping, etc.

@coderanger
Copy link
Contributor

You can also use <%= whatever.to_json %> if inspect makes you feel sad.

@afiune
Copy link
Author

afiune commented Nov 30, 2016

@coderanger I like that man! Let me try it!! 👍

@afiune afiune force-pushed the afiune/vagrant-need-slashes-to-be-scaped branch from bff2725 to ce8b496 Compare November 30, 2016 17:56
We need to use `.inspect` so that the back slashes get scaped in the
`Vagrantfile`

Signed-off-by: Salim Afiune <[email protected]>
@afiune afiune force-pushed the afiune/vagrant-need-slashes-to-be-scaped branch from ce8b496 to c99d6f1 Compare November 30, 2016 17:57
@afiune
Copy link
Author

afiune commented Nov 30, 2016

good call @coderanger !!

@afiune
Copy link
Author

afiune commented Nov 30, 2016

cc/ @test-kitchen/maintainers

@afiune afiune force-pushed the afiune/vagrant-need-slashes-to-be-scaped branch from b912b3d to 43eaa87 Compare November 30, 2016 18:17
@afiune afiune added the Bug label Nov 30, 2016
@afiune afiune merged commit f02dcf0 into master Dec 5, 2016
@tas50 tas50 deleted the afiune/vagrant-need-slashes-to-be-scaped branch January 30, 2022 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants