INNER CODE UNIT · TypeScript
add
EndBug/add-and-commit · src/main.ts:448
async function add(
ignoreErrors: 'all' | 'pathspec' | 'none' = 'none',
dryRun = false,
) {
const input = getInput('add');
if (!input) return [];
const parsed = parseInputArray(input);
const res: (string | void)[] = [];
for (const args of parsed) {
const gitArgs = dryRun
? ['--dry-run', ...parseGitArgs(args)]
: parseGitArgs(args);
res.push(
// Push the result of every git command (which are executed in order) to the array
// If any of them fails, the whole function will return a Promise rejection
await git