Skip to content

Commit

Permalink
Merge pull request #40 from mijoharas/fix-incorrect-usage-of-got
Browse files Browse the repository at this point in the history
Got version 11.8.6 throws an error with auth option.
  • Loading branch information
sbosio authored Dec 27, 2024
2 parents 21d5349 + 92754dd commit ed297a7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ function * checkStatus(context, heroku, configVars) {
var execUrl = _execUrl(context, configVars)

return cli.got(`https://${execUrl.host}`, {
auth: execUrl.auth,
username: execUrl.username,
password: execUrl.password,
path: _execApiPath(configVars),
headers: _execHeaders(),
method: 'GET'
Expand Down Expand Up @@ -164,7 +165,8 @@ function updateClientKey(context, heroku, configVars, callback) {
var dyno = _dyno(context)

return cli.got(`https://${execUrl.host}`, {
auth: execUrl.auth,
username: execUrl.username,
password: execUrl.password,
path: `${_execApiPath(configVars)}/${dyno}`,
method: 'PUT',
headers: {..._execHeaders(), 'content-type': 'application/json'},
Expand Down Expand Up @@ -211,9 +213,10 @@ function _execUrl(context, configVars) {
} else {
urlString = process.env.HEROKU_EXEC_URL
}
var execUrl = url.parse(urlString)
execUrl.auth = `${context.app}:${process.env.HEROKU_API_KEY || context.auth.password}`
return execUrl
var execUrl = url.parse(urlString);
execUrl.username = context.app;
execUrl.password = process.env.HEROKU_API_KEY || context.auth.password;
return execUrl;
}
}

Expand Down

0 comments on commit ed297a7

Please sign in to comment.