mirror of
https://github.com/tomru/wichteln.git
synced 2026-03-03 06:27:15 +01:00
add langs 2021
This commit is contained in:
@@ -53,7 +53,7 @@ function read() {
|
||||
|
||||
const run = async () => {
|
||||
const people = await read();
|
||||
const dryRun = process.argv[2] === "--dry";
|
||||
const send = process.argv[2] === "--send";
|
||||
|
||||
if (!people || !people.length) {
|
||||
throw new Error("input file empty");
|
||||
@@ -83,8 +83,8 @@ const run = async () => {
|
||||
people.map(({ name, pick }) => `${name} picked ${pick}`).join("\n")
|
||||
);
|
||||
|
||||
if (dryRun) {
|
||||
console.log("DryRun: did not send emails");
|
||||
if (!send) {
|
||||
console.log("DryRun: did not send emails. To send pass --send option");
|
||||
return;
|
||||
}
|
||||
people.forEach(p => mail(p.email, p.name, p.pick));
|
||||
|
||||
Reference in New Issue
Block a user