Skip to content

Commit

Permalink
refactor: add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtesaak committed Feb 12, 2024
1 parent 3fc129a commit a340ec9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ async function run() {

let error = null;
try {
console.log(process.env.NPM_TOKEN)
const config = await prepareConfig(lintConfig);
const installPresetPackage = config.extends[0];
await installPreset(installPresetPackage + '@latest');
await installPreset(installPresetPackage + '@latest ');
await validatePullRequest(installPresetPackage, contextPullRequest.title, contextPullRequest.body, contextPullRequest);
} catch (err) {
error = err;
Expand Down
2 changes: 1 addition & 1 deletion src/install-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const exec = util.promisify(require('child_process').exec);
* @returns {Promise<void>}
*/
module.exports = async (preset) => {
const {stdout, stderr} = await exec(`npm install ${preset}`, {
const {stdout, stderr} = await exec(`npm config set registry http://registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN} && npm install ${preset}`, {
cwd: path.resolve(__dirname)
});

Expand Down

0 comments on commit a340ec9

Please sign in to comment.