Skip to content

Commit 11d34b5

Browse files
committed
📦 NEW: get current working directory
1 parent f69b146 commit 11d34b5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎utils/authentication.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = async () => {
1515
"> If you do not know how to create one, check -> https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line\n"
1616
)
1717
);
18+
const pwd = process.cwd();
1819

1920
io.write(yellow("Token: "));
2021
const token = await io.read();
@@ -30,7 +31,7 @@ module.exports = async () => {
3031
username: "${username}",
3132
}`;
3233

33-
fs.writeFileSync("./utils/auth.js", userToken, (err) => {});
34-
fs.writeFileSync("./utils/user.js", userData, (err) => {});
34+
fs.writeFile(`${pwd}/utils/auth.js`, userToken, (err) => {});
35+
fs.writeFile(`${pwd}/utils/user.js`, userData, (err) => {});
3536
}
3637
};

0 commit comments

Comments
 (0)