-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add prepend function and tests #45
Conversation
Added flag to enable prepending below Include directives as well. To support the scenarios described in microsoft/vscode-remote-release#4592 (comment) |
@tanhakabir Thanks for the pr! About the question in the pr description, in my first thought the expected result should be:
This result doesn't make any sense because it shadows config.prepend({
IdentityFile: '~/.ssh/id_rsa',
}) I'd expect the result to be:
rather than:
|
Oh, about the flag to change the prepend offset, can you change it to something like
I can turn on the flag as well to get results like:
If the flag is on but no section were found, just append the object to the end of the config. |
btw, I've updated master branch to see if we can trigger CI on pull request. Please rebase master before pushing branch. |
94462e1
to
662a90b
Compare
… to wait for a section first
@cyjake thanks for your feedback! Made the appropriate changes! |
@cyjake I got a notification for a comment from you but I don't see anything. Just checking in to see if I missed anything? |
@tanhakabir yeah I made a comment without noticing I misunderstood the context. |
v4.1.0 released |
Hey @cyjake 👋
I'm from the VS Code team and I was working on this issue: microsoft/vscode-remote-release#4592 when I realized I needed a prepend function from your library and rather than hacking prepend myself in the extension I wanted to contribute. I followed what you did in the
append
function and added aprepend
function along with the same set of tests you had forappend
.One part I wasn't completely certain about but I assumed the behavior of is when you have a config that is something like this:
and you prepend:
I assumed the result should add the fields to the first config from the old config.