Skip to content

Commit

Permalink
fix(apikeys.js): fixed a bug where windows path was incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
Simen Daehlin committed Sep 5, 2022
1 parent 85467db commit 6421c89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion providers/heroku/apiKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ const { spinner } = require(`../../utils/config`);

const getApiKey = async () => {
try {
const slash = os.platform() === `win32` ? `\\` : `/`;

const apiToken = await shell
.cat(`${os.homedir()}/.netrc `)
.cat(`${os.homedir()}${slash}.netrc `)
.grep(
`[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}`
)
Expand Down

0 comments on commit 6421c89

Please sign in to comment.