Skip to content

Commit c8beec9

Browse files
siderdaxsteveukx
andauthored
Update simple-git example to remove await (#1098)
* Update simple-git example to remove await Removed 'await' from the clone operation in simple-git example. * Changeset Thank you to @siderdax for identifying this issue. --------- Co-authored-by: Steve King <steve@mydev.co>
1 parent 9dd70fd commit c8beec9

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.changeset/fair-radios-sleep.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"simple-git": patch
3+
---
4+
5+
Update simple-git documentation for `cwd` remove incorrect use of `await`
6+
7+
Thank you to @siderdax for identifying this issue.
8+

examples/git-change-working-directory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const target = join(__dirname, 'repos', 'git-js');
2121

2222
// repo is now a `SimpleGit` instance operating on the `target` directory
2323
// having cloned the remote repo then switched into the cloned directory
24-
const repo: SimpleGit = await simpleGit().clone(remote, target).cwd({ path: target });
24+
const repo: SimpleGit = simpleGit().clone(remote, target).cwd({ path: target });
2525
```
2626

2727
In the example above we're using the command chaining feature of `simple-git` where many commands

0 commit comments

Comments
 (0)