Skip to content

Commit f49716f

Browse files
author
Simen Daehlin
committed
fix: fixed multiple paths for new hooks
1 parent f5f763c commit f49716f

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

providers/heroku/apiKey.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
const os = require(`os`);
22
const shell = require(`shelljs`);
3-
const { setConfig } = require(`../../utils/config`);
3+
const { setConfig, config } = require(`../../utils/config`);
44
const { spinner } = require(`../../utils/config`);
55

66
const getApiKey = async () => {
7+
const providerConfig = config.providers[config.provider];
78
try {
89
const slash = os.platform() === `win32` ? `\\` : `/`;
910

providers/heroku/heroku.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const _createEnv = async herokuConfig => {
1111
);
1212
spinner.stopAndPersist({
1313
symbol: `⚙️`,
14-
text: ` Configuring ${chalk.magenta.bold(
14+
text: ` Configuring ${chalk.magenta.bold(
1515
`${config.projectName.toUpperCase()}'s`
1616
)} enviroment variables ${_herokuWithRegion()}`
1717
});

providers/heroku/herokuFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const createHerokuFile = async herokuConfig => {
2323

2424
await spinner.stopAndPersist({
2525
symbol: `⚙️`,
26-
text: ` Added and configured ${chalk.bold.green(
26+
text: ` Added and configured ${chalk.bold.green(
2727
config.provider.toUpperCase()
2828
)} to project \n`
2929
});

utils/detection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const detectHerokuCLI = async () => {
102102
text: ` ${chalk.bold.magenta(`Heroku`)} CLI detected \n`
103103
});
104104
await getApiKey();
105-
if (!config.apiToken) {
105+
if (!config.providers.heroku.apiToken) {
106106
child_process.execFileSync(`heroku`, [`login`], { stdio: `inherit` });
107107
await getApiKey();
108108
}

0 commit comments

Comments
 (0)