We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
--shell
1 parent b42d877 commit ea8cef3Copy full SHA for ea8cef3
server/src/shellcheck/index.ts
@@ -120,13 +120,19 @@ export class Linter {
120
.map((folderName) => `--source-path=${folderName}`)
121
122
const args = [
123
- `--shell=${shellName}`,
124
'--format=json1',
125
'--external-sources',
126
...sourcePathsArgs,
127
...additionalArgs,
128
]
129
+ // only add `--shell` argument if non is provided by the user in their
130
+ // config. This allows to the user to override the shell. See #1064.
131
+ const userArgs = additionalArgs.join(' ')
132
+ if (!(userArgs.includes('--shell') || userArgs.includes('-s '))) {
133
+ args.unshift(`--shell=${shellName}`)
134
+ }
135
+
136
logger.debug(`ShellCheck: running "${this.executablePath} ${args.join(' ')}"`)
137
138
let out = ''
0 commit comments