fix: access files properly

pull/515/head
Josh Moore 8 months ago committed by Josh Moore
parent 0b0fbe9eb7
commit a68b91cf20

@ -175,5 +175,5 @@ function generatePublications(pubTitle, filename) {
}
// ! Generate README.md
fs.writeFileSync(path.join(__dirname, 'README.md'), Object.values(BUILD_SECTION).map((section) => section()).join(`${EOL}${EOL}`));
fs.writeFileSync(path.join(process.cwd(), 'README.md'), Object.values(BUILD_SECTION).map((section) => section()).join(`${EOL}${EOL}`));
console.log('Done!');

@ -71,7 +71,7 @@ function putWiki(lastId, token) {
method: 'POST',
headers: { 'Authorization': `bearer ${token}`, 'Content-Type': CONTENT_TYPE },
body: qs.stringify({
content: fixContent(fs.readFileSync(path.join(__dirname, 'README.md')).toString()),
content: fixContent(fs.readFileSync(path.join(process.cwd(), 'README.md')).toString()),
page: WIKI_PAGE,
reason: WIKI_REASON,
previous: lastId

Loading…
Cancel
Save