Skip to content

Commit ae7c567

Browse files
committed
adjust options
1 parent 262ab77 commit ae7c567

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apps/codingcatdev/scripts/dev-to.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,13 @@ for await (const file of g) {
5757
// Get new devto url and update
5858
if (response.status === 201) {
5959
const json = await response.json();
60-
console.log('data from devto', json);
6160
if (json?.url) {
6261
console.log('Updating', file, { devto: json.url });
6362
const newMdFile = matter.stringify(content, {
6463
...data,
6564
devto: json.url
6665
});
67-
fs.writeFileSync(file, newMdFile, { encoding: 'utf8', flag: 'r' });
66+
fs.writeFileSync(file, newMdFile, { encoding: 'utf8' });
6867
}
6968
}
7069
} catch (error) {

0 commit comments

Comments
 (0)