Title: Fix example by forcing backslashes with path.posix by rcjsuen · Pull Request #1346 · nodegit/nodegit · GitHub
Open Graph Title: Fix example by forcing backslashes with path.posix by rcjsuen · Pull Request #1346 · nodegit/nodegit
X Title: Fix example by forcing backslashes with path.posix by rcjsuen · Pull Request #1346 · nodegit/nodegit
Description: A user reported in #1339 that an error will occur if you try to run the examples/add-and-commit.js example on Windows. $ node add-and-commit.js nodegit\node_modules\nodegit-promise\lib\done.js:10 throw err; ^ Error: invalid path: 'salad\toast\strangerinastrangeland\theresnowaythisexists\newfile.txt' at Error (native) This is because addByPath from of Index seems to only accept paths with forward slashes. Replacing the path.join with path.posix.join will resolve the problem.
Open Graph Description: A user reported in #1339 that an error will occur if you try to run the examples/add-and-commit.js example on Windows. $ node add-and-commit.js nodegit\node_modules\nodegit-promise\lib\done.js:10 ...
X Description: A user reported in #1339 that an error will occur if you try to run the examples/add-and-commit.js example on Windows. $ node add-and-commit.js nodegit\node_modules\nodegit-promise\lib\done.js:10 ...
Opengraph URL: https://github.com/nodegit/nodegit/pull/1346
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:eda1768f-d199-936e-a905-ce275dc9a7eb |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B804:1F68DB:7BFC673:A8F4AF6:6A5E60F2 |
| html-safe-nonce | 3132d03db3ee3cf077d3c6567a6e3048d29b0e5cd927f1afbe918837afc016db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODA0OjFGNjhEQjo3QkZDNjczOkE4RjRBRjY6NkE1RTYwRjIiLCJ2aXNpdG9yX2lkIjoiMjkyODU3MTY4MDc0OTkzNjg4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f4437712db0e6152f36d77653aa0cb336815ed8f9f8e4aab1cce1e3b3ceec31b |
| hovercard-subject-tag | pull_request:134321829 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodegit/nodegit/pull/1346/files |
| twitter:image | https://avatars.githubusercontent.com/u/15629116?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/15629116?s=400&v=4 |
| og:image:alt | A user reported in #1339 that an error will occur if you try to run the examples/add-and-commit.js example on Windows. $ node add-and-commit.js nodegit\node_modules\nodegit-promise\lib\done.js:10 ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5684292e6b02f9c72a31f9bc29d1fa47afbeda5424e76fb5f0b7c08766757177 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d151d247da13e8abadf6fd7f5a5f8659dae9a8d0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width