Skip to content

Commit 5c12301

Browse files
authored
fix: rely on string-argv for git arg parsing (#180)
* fix: switch to string-argv for git args parsing * chore: fix debug messages for matchGitArgs * docs: add paragraph about git args parsing
1 parent 0d2694b commit 5c12301

File tree

5 files changed

+66
-513
lines changed

5 files changed

+66
-513
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ Add a step like this to your workflow:
6060
tag: 'v1.0.0 --force'
6161
```
6262
63+
### Git arguments
64+
65+
Multiple options let you provide the git arguments that you want the action to use. It's important to note that these arguments **are not actually used with a CLI command**, but they are parsed by a package called [`string-argv`](https://npm.im/string-argv), and then used with [`simple-git`](https://npm.im/simple-git).
66+
What does this mean for you? It means that string that contain a lot of nested quotes may be parsed incorrectly, and that specific ways of declaring arguments may not be supported by this libraries. If you're having issues with your argument strings you can check whether they're being parsed correctly either by [enabling debug logging](https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging) for your workflow runs or by testing it directly with `string-argv` ([RunKit demo](https://npm.runkit.com/string-argv)): if each argument and option is aprsed correctly you'll see an array where every string is an option or value.
67+
6368
### Adding files:
6469

6570
The action adds files using a regular `git add` command, so you can put every kind of argument in the `add` option. For example, if you want to force-add a file: `./path/to/file.txt --force`.

lib/index.js

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)