Fixed username in save message.
This commit is contained in:
parent
7f79a44830
commit
350a2dc1dc
|
@ -47,10 +47,15 @@ async function writeToIndex(posts, profilePaths, user, args) {
|
|||
|
||||
try {
|
||||
const yamlIndex = yaml.safeDump(data);
|
||||
const saved = await save(filepath, Buffer.from(yamlIndex, 'utf8'));
|
||||
|
||||
return save(filepath, Buffer.from(yamlIndex, 'utf8'));
|
||||
console.log(user);
|
||||
|
||||
logger.info(`Saved index with ${posts.length} new posts for ${user.name}`);
|
||||
|
||||
return saved;
|
||||
} catch (error) {
|
||||
logger.error(`Could not save index for ${user.username}: ${error.message}`);
|
||||
logger.error(`Could not save index for ${user.name}: ${error.message}`);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue