Skip to content

Commit

Permalink
fix: talend-script lint is not working in jenkins (#5040)
Browse files Browse the repository at this point in the history
* fix

* add changeset
  • Loading branch information
smouillour authored Dec 6, 2023
1 parent de3be66 commit 6e85e98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-grapes-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/scripts-core': patch
---

Fix: make lint working in jenkins
8 changes: 5 additions & 3 deletions tools/scripts-core/src/scripts/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { fileURLToPath } from 'url';

import * as utils from '@talend/scripts-utils';

import { resolveScript } from '../utils/bin.js';
import { getUserConfigFile } from '../utils/env.js';

function getSmartOptions(opts, categories) {
Expand Down Expand Up @@ -59,9 +60,9 @@ async function lintEs(env, presetApi, options) {
}
}

const eslint = utils.path.resolveBin('eslint');
args = [resolveScript('eslint')].concat(args);

return utils.process.spawn(eslint, args, {
return utils.process.spawn('node', args, {
stdio: 'inherit',
env,
});
Expand Down Expand Up @@ -100,8 +101,9 @@ async function lintStyle(env, presetApi, options) {
args.push('-f', 'json');
}
}
args = [resolveScript('stylelint')].concat(args);

return utils.process.spawn(utils.path.resolveBin('stylelint'), args, {
return utils.process.spawn('node', args, {
stdio: 'inherit',
env,
});
Expand Down

0 comments on commit 6e85e98

Please sign in to comment.