Skip to content

Commit

Permalink
Merge pull request #88 from admisio/cli_improvements
Browse files Browse the repository at this point in the history
(project) CLI improvements
  • Loading branch information
starvy authored Mar 5, 2024
2 parents 50ec888 + e0f455d commit 481fa8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/usersplit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function main({
outputFile: string;
superadminFile: string;
}) {
const superadminPassword = fs.readFileSync(path.join(__dirname, superadminFile), 'utf8');
const superadminPassword = fs.readFileSync(path.join(__dirname, superadminFile), 'utf8').trim();
const lines = fs.readFileSync(path.join(__dirname, usersFile), 'utf8').split('\n');
const passwords = fs.readFileSync(path.join(__dirname, passwordsFile), 'utf8').split('\n');

Expand Down Expand Up @@ -45,6 +45,9 @@ async function main({
});

for (const line of lines) {
if (!line) {
continue;
}
const [group, admin, username, password] = line.split(' ');
let dbAdmin = await prisma.admin.findUnique({
where: {
Expand Down

0 comments on commit 481fa8a

Please sign in to comment.