Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Use WSL PHP for validation #25576

Closed
wants to merge 2,935 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
2935 commits
Select commit Hold shift + click to select a range
11e3f1b
failover nsfw to gulp-watch
joaomoreno Jun 27, 2017
c45cdff
resolveFiles returns IResolveFileResult
isidorn Jun 27, 2017
1f0e189
fixes #29239
isidorn Jun 27, 2017
c854b69
rename and null check
isidorn Jun 27, 2017
b57f814
Editor response is slower now, wait before navigating within it.
michelkaporin Jun 27, 2017
17a32a2
Updated readme after JS->TS refactorings.
michelkaporin Jun 27, 2017
b80abab
fixes #29537
joaomoreno Jun 27, 2017
af8a3e5
fixes #29535
joaomoreno Jun 27, 2017
98fa497
fixes #29350
joaomoreno Jun 27, 2017
ad57b3c
fixes #29349
joaomoreno Jun 27, 2017
dd07972
fixes #27488
joaomoreno Jun 27, 2017
468dcd2
Fixed #29559 Multi root folders view name is not updated on removing …
foreverest Jun 27, 2017
d9bae43
fixes #26034
joaomoreno Jun 27, 2017
96b687b
More detailed error when obtaining editor text fails.
michelkaporin Jun 27, 2017
a24b299
clear quick open input if user canceled dialog
bpasero Jun 27, 2017
9c24e9a
fix #29594
bpasero Jun 27, 2017
74abb32
auto assign snippet issues
jrieken Jun 27, 2017
2cdeb68
Do not trimForExclusions (fixes #29520) (#29632)
chrmarti Jun 27, 2017
2672ba2
Restore trimForExclusions to fileSearch glob.parse
roblourens Jun 27, 2017
e8943d8
Add editor sublabels, perf-profile
chrmarti Jun 27, 2017
410af6d
Support updating existing item in tasks.json with problem matchers
dbaeumer Jun 27, 2017
14d457e
Fixes #29573: 'group' property is not an object literal in tasks.json
dbaeumer Jun 27, 2017
19f310a
Fixes #29427 & #29617
dbaeumer Jun 27, 2017
29bb20c
Adopt tasks.json to new schema
dbaeumer Jun 27, 2017
75082c7
Fixes #29628: Show Task Log opens Output pane instead of Integrated T…
dbaeumer Jun 27, 2017
fe276c9
Fixes #29623: Restart task is not triggered from command and top leve…
dbaeumer Jun 27, 2017
3f876fe
Fixed #29525 Explorer: show "Folders" as title when in multi root
foreverest Jun 27, 2017
92681cb
emmet.excludeLang shouldnt need reload. Fixes #29680
ramya-rao-a Jun 27, 2017
a5ce4b6
Removing emmet.variables that arent used by emmet snippets
ramya-rao-a Jun 27, 2017
96643e3
ensure we use version 2.3.4 for building
kieferrm Jun 27, 2017
d88db2c
Fix #29601 - exclude settings not correctly applied on windows
roblourens Jun 28, 2017
c04250a
Trim C:/ correctly
roblourens Jun 28, 2017
32c40e4
add hashed remotes
kieferrm Jun 28, 2017
a945a56
Add tests for getAbsoluteGlob
roblourens Jun 28, 2017
1c8b38e
reenable command: links in hovers; fixes #29076
kieferrm Jun 28, 2017
a4525f5
Fix win test
roblourens Jun 28, 2017
4d97535
Merge branch 'roblou/fixWindowsMultirootSearc'
roblourens Jun 28, 2017
bf2bee9
adopt official release of TS 2.4.1
kieferrm Jun 28, 2017
04a1b72
Fix #29538 - update search viewlet with excludes from first open root…
roblourens Jun 28, 2017
b69887c
Use emmet.includeLanguages to enable emmet abbr in non supported lang…
ramya-rao-a Jun 28, 2017
63def6e
Support both syntaxProfiles and includeLanguages until #29678 is reso…
ramya-rao-a Jun 28, 2017
d50aae1
introduce and use ResourceGlobMatcher
bpasero Jun 28, 2017
3e4a7d1
fix imports
bpasero Jun 28, 2017
1401409
Decide on multi root actions naming (fixes #29434)
bpasero Jun 28, 2017
38b523c
Configure git for testuser, rather then for root.
michelkaporin Jun 28, 2017
b6faabe
Support group and presentation in global schema
dbaeumer Jun 28, 2017
fa89751
Fixes #29721: Rename Global Task menu to Tasks
dbaeumer Jun 28, 2017
8a31406
remove outdated debugService.enabled
isidorn Jun 28, 2017
c1d6122
onDidTerminateDebugSession do not fire when debug session doesn't sta…
isidorn Jun 28, 2017
208f3ae
Trying to fix #29731
michelkaporin Jun 28, 2017
741f961
Fixes #29732: Make default group entry more usable
dbaeumer Jun 28, 2017
9081bf6
fix compile errors
isidorn Jun 28, 2017
8c77107
Merge pull request #29596 from foreverest/multiRootName
isidorn Jun 28, 2017
15bf0c6
Allow 3 trials to wait until editor is drawn.
michelkaporin Jun 28, 2017
3d0bdea
Fixes #29599: Have the close diff review pane button respect the dark…
alexdima Jun 28, 2017
fd2173a
fixes #29728
joaomoreno Jun 28, 2017
d30c831
node-debug@1.14.8
weinand Jun 28, 2017
1888ad8
use final DAP 1.21.0
weinand Jun 28, 2017
5c85e34
fixes #29581
joaomoreno Jun 28, 2017
e1b9a2f
simplify explorer title setting
isidorn Jun 28, 2017
d6c439a
"Add root folder" on windows adds "file:///c%3a/Users/..." (fixes #29…
bpasero Jun 28, 2017
19decf7
Add insertSpaceAfterTypeAssertion formatting option
mjbvz Jun 28, 2017
3a76e48
:lipstick:
bpasero Jun 28, 2017
1add158
don't freeze suggestions when not on a word anymore, #29353
jrieken Jun 28, 2017
ddafd22
add arch to telemetry, #507
jrieken Jun 28, 2017
b294944
Fixes #29326: Avoid flickering by respecting the previous frame layou…
alexdima Jun 28, 2017
471ef70
Fix paste across folders
isidorn Jun 28, 2017
a48e068
Fixes #29610: Improve presentation of problem matcher picker
dbaeumer Jun 28, 2017
e23d2b6
Improve wording
dbaeumer Jun 28, 2017
c65f550
fix tests
isidorn Jun 28, 2017
dda321e
Rename customize -> configured
dbaeumer Jun 28, 2017
4fdbc6c
disable "copy" for roots
isidorn Jun 28, 2017
0626287
only ignore whitespace a completion selects, not whitespace users typ…
jrieken Jun 28, 2017
b40aaf4
Fixes #29742: Add telemetry event for task customization
dbaeumer Jun 28, 2017
5ad1618
with incomplete suggest results, only re-trigger when still typing a …
jrieken Jun 28, 2017
5582a20
fix Select for Compare action
isidorn Jun 28, 2017
5f443db
debugHover: fix scroll for complex hover
isidorn Jun 28, 2017
bf5b1db
Document current keybinding behaviour for TCIM.Zhuyin (#28237)
alexdima Jun 28, 2017
53e3e9e
Fixes #28237: Identify keyboard layouts where A-Z are missing or unus…
alexdima Jun 28, 2017
69e9593
Fix #29633
sandy081 Jun 28, 2017
fee4d54
fixes #23774
joaomoreno Jun 28, 2017
c9b1c66
fix tree multi root expansion
isidorn Jun 28, 2017
fcd9a89
Merge branch 'master' of github.com:Microsoft/vscode
joaomoreno Jun 28, 2017
60efdae
fixes #27595
joaomoreno Jun 28, 2017
ab3c945
Import 'nls' in extensions entry point. Fixes #29098.
michelkaporin Jun 28, 2017
1bd9439
Fix #29756
sandy081 Jun 28, 2017
b9a348e
Fixes #29761: Use picker instead of quick pick to select a build or t…
dbaeumer Jun 28, 2017
12ea528
Correctly configuring nls for use. #29098
michelkaporin Jun 28, 2017
6a26abf
add telemetry for new multiroot workspace API, #28526
jrieken Jun 28, 2017
9959889
fixes #29547
isidorn Jun 28, 2017
496e3ff
remove unnecessary code
kieferrm Jun 28, 2017
93101a2
fix #29641
jrieken Jun 28, 2017
308709b
Fixes Microsoft/monaco-editor#481: Have aria live work in IE and Edge…
alexdima Jun 28, 2017
dc99c9a
Fixes Microsoft/monaco-editor#477: Menu separators should not have a …
alexdima Jun 28, 2017
8e42dc8
Fixes #29741: use signs for diff lines for Screen Readers
alexdima Jun 28, 2017
81a9bb5
Fix #29609
sandy081 Jun 28, 2017
ff1d3c2
#29609 Check for split view existence
sandy081 Jun 28, 2017
4a411dc
#29756 Much cleaner fix
sandy081 Jun 28, 2017
bacc894
fix compile errors
bpasero Jun 28, 2017
7c871fa
remove extra console.log
bpasero Jun 28, 2017
3d0a664
add jsdoc comments, #29759
jrieken Jun 28, 2017
f2a5365
Switch to scheme blacklist for links in markedstring
mjbvz Jun 28, 2017
dcdd24d
node-debug2@1.14.4
roblourens Jun 28, 2017
f317513
fixes #29537
joaomoreno Jun 28, 2017
e692fc7
Retain suggest docs stickyness with new editors
ramya-rao-a Jun 28, 2017
7ba1dcf
Emmet suggestions in non markup/stylesheet languages #29532
ramya-rao-a Jun 28, 2017
9ac6c54
Support space after comma in links like '[x, y]'
Tyriar Jun 28, 2017
082ccc4
Focus terminal after closing find widget with mouse
Tyriar Jun 28, 2017
04f25df
Emmet suggestions for jsx only when expicitly asked for #29532
ramya-rao-a Jun 28, 2017
2f77f9f
Stop supporting both syntaxProfiles, includeLanguage settings in new …
ramya-rao-a Jun 28, 2017
ff6b72f
updating distro
kieferrm Jun 28, 2017
e3673c6
Support multiCursorModifier in terminal
Tyriar Jun 28, 2017
2d0cf23
Have terminal use editor's hover widget styles
Tyriar Jun 28, 2017
a370420
Use proper path equal or parent check in file watcher
Tyriar Jun 28, 2017
98f7673
Uplevel xterm.js
Tyriar Jun 28, 2017
9cb698b
Update comments
ramya-rao-a Jun 28, 2017
e2a18e4
Fixes #29802 Corner cases of Select next/prev item feature
ramya-rao-a Jun 28, 2017
886f472
Fix #29753. Ignore comments area when reindenting and honor onEnter r…
rebornix Jun 28, 2017
15ccb8d
Fix #29664, Fix #29668. Add JSON indentation rules.
rebornix Jun 28, 2017
9fa2a25
Fix #29725. Add indentation rules for CSS.
rebornix Jun 28, 2017
280ea0b
Fix infinite loop when node doesnt have non comment children. #27763
ramya-rao-a Jun 28, 2017
bca6c99
Fix #29799. Fix typo for autoIndent description.
rebornix Jun 28, 2017
5afaf1d
Robustness towards invalid URIs
chrmarti Jun 28, 2017
23ac6d4
Fix nsfw tests on windows
roblourens Jun 29, 2017
91e83d4
Fallback to warn on label
chrmarti Jun 29, 2017
9d46f70
Fix #29755. Adjust cursor position when pressing enter inside leading…
rebornix Jun 29, 2017
b405e7c
put cache of old selection at top
rebornix Jun 29, 2017
e99bdad
Revisit #29457. Auto select one more character if the selected whites…
rebornix Jun 29, 2017
d1f8686
Reactivate windows nsfw tests
Tyriar Jun 29, 2017
63fe7ba
Move single line does not need selection readjustment
rebornix Jun 29, 2017
c1b81e5
Fix #29803. Do not reindent the line if the content is pasted to the …
rebornix Jun 29, 2017
26d28ca
Merge pull request #29815 from Microsoft/tyriar/fix_windows_nsfw_tests
Tyriar Jun 29, 2017
9541932
Fix #29801 - glob with correct path when testing sibling exclude expr…
roblourens Jun 29, 2017
4fca394
Fixes #29820: Allow users to configure the default build and test task
dbaeumer Jun 29, 2017
8da5b22
I can not change the encoding of a file (fixes #29797)
bpasero Jun 29, 2017
a961d0a
tfs: debug linux build
joaomoreno Jun 29, 2017
c3ce4a5
tfs: fix linux 32
joaomoreno Jun 29, 2017
cc4d6a8
tfs: linux
joaomoreno Jun 29, 2017
a609b2f
Fixes #29561: Escape 'scanning the build ouput' quick open -> run tas…
dbaeumer Jun 29, 2017
91f83af
Wait until git extension is loaded before checking for localized view…
michelkaporin Jun 29, 2017
60a2c5e
debug remove counter in repl
isidorn Jun 29, 2017
101ff0a
Fixes #29759: More Task API feedback
dbaeumer Jun 29, 2017
f1fec6b
disable unit tests for linux 32
joaomoreno Jun 29, 2017
db88728
more output for failing nsfw watcher
bpasero Jun 29, 2017
0e39ec5
Fixes #29835: Move Task API from proposed to final.
dbaeumer Jun 29, 2017
a05d64d
fixes #29448
joaomoreno Jun 29, 2017
6d09da4
better message for gulp watch failing with nsfw
bpasero Jun 29, 2017
7b4d504
findClosest
isidorn Jun 29, 2017
9e04762
fixes #29839
joaomoreno Jun 29, 2017
ae9a386
Fixes #29785: Task is running in terminal with "runner": "process"
dbaeumer Jun 29, 2017
dc3c181
fixes #29777
joaomoreno Jun 29, 2017
eb68244
Fixes #29400: Change menu item label for `workbench.action.toggleMult…
alexdima Jun 29, 2017
ca559d7
Fixes #29836: Hide the diff review pane when the diff editor gets foc…
alexdima Jun 29, 2017
46ac927
Info about screenshots
michelkaporin Jun 29, 2017
ea8d96d
Fixes #29606: Node 7 sends ASCII control characters not handled by th…
dbaeumer Jun 29, 2017
4b7c117
Small code cleanup
dbaeumer Jun 29, 2017
d205f20
debug: use inline decoration to remove token colors in HC theme
isidorn Jun 29, 2017
4c59f44
Fixes #29593: Tasks 2.0.0: presentation is not allowed as a global pr…
dbaeumer Jun 29, 2017
086f6b3
fixes #27422
joaomoreno Jun 29, 2017
1c86623
fixes #29729
joaomoreno Jun 29, 2017
f00d4f7
Revert "fixes #29729"
joaomoreno Jun 29, 2017
a16f659
fixes #29729
joaomoreno Jun 29, 2017
8787538
Fix for #29608 'QuickOpen looks misaligned in monokai theme'. (#29860)
brandontruggles Jun 29, 2017
3585fa3
[css] update service (for #27189)
aeschli Jun 29, 2017
3019249
Fixes #29863: Remove Run Test Task from the global menu until we have…
dbaeumer Jun 29, 2017
173a9bf
Add documentation for proposed configuration api
sandy081 Jun 29, 2017
7e94116
Doc for proposed config api
sandy081 Jun 29, 2017
20aea5d
Fix merge issues
sandy081 Jun 29, 2017
8a6a895
Uplevel xterm.js
Tyriar Jun 29, 2017
01cbc6d
[json] update service (for #29848)
aeschli Jun 29, 2017
1b34b1d
Fix #29828, Fix #29843, Fix #29876. Enter in the middle of content sh…
rebornix Jun 29, 2017
42ae1fc
Emmet html suggestions after typing : #29758
ramya-rao-a Jun 29, 2017
8b4e442
Fix #29881. Null guard
rebornix Jun 29, 2017
605ee59
Fix extra tabs when wrapping with inline element #27621
ramya-rao-a Jun 29, 2017
8da3ea9
Use original scheme (fixes #29872)
chrmarti Jun 29, 2017
771b684
Do not raw attach straight away due to wrong event ordering
isidorn Jun 29, 2017
4ea63e5
Wrap partial line with abbr #29857
ramya-rao-a Jun 29, 2017
229a54d
Small word smithing
dbaeumer Jun 29, 2017
2f57fa7
Fix #29719 - exclude nested folders during search to not show dupes
roblourens Jun 29, 2017
ded0541
Mitigate #29722. No indentation change if there is no indentation rul…
rebornix Jun 29, 2017
7910b3d
Fix js/ts decrease indentation for block comments inside brackets
mjbvz Jun 29, 2017
e7de8b2
More trigger chars #29758
ramya-rao-a Jun 30, 2017
0ee00cb
Emmet Error handling Fixes #29897
ramya-rao-a Jun 30, 2017
d66d673
Removing dead code
ramya-rao-a Jun 30, 2017
7e29372
Use new emmet commands only when useNewEmmet is true
ramya-rao-a Jun 30, 2017
e3c3d7c
Merge pull request #29859 from Microsoft/update-notification
joaomoreno Jun 30, 2017
541b61b
fixes #29624
joaomoreno Jun 30, 2017
733e64b
[css] update service (for #27189)
aeschli Jun 30, 2017
ac2d070
Fixes #29868 & #29865
dbaeumer Jun 30, 2017
db5e65b
Fix #29760
sandy081 Jun 30, 2017
8b6ba66
Switched to HTTPS requests for Transifex. Added check for empty keys …
michelkaporin Jun 30, 2017
14ae6bb
2017-06-30. Merged in translations from Transifex.
michelkaporin Jun 30, 2017
885c30a
Fixes #29922: Starting Debug with a preLauch task referenced from an …
dbaeumer Jun 30, 2017
db3ac35
Await wait
michelkaporin Jun 30, 2017
a7b27bb
Added step to run npm install
egamma Jun 30, 2017
9b0ba2f
Fixes #29940
michelkaporin Jun 30, 2017
4861494
Update README.md
michelkaporin Jun 30, 2017
6dc5253
Update README.md
michelkaporin Jun 30, 2017
3494634
Always split quick links
chrmarti Jun 30, 2017
158270d
Updated setting value to be more intutive
ramya-rao-a Jun 30, 2017
3f8bd16
update dependency on vscode-extension-telemetry
kieferrm Jun 30, 2017
0edc80d
add shrinkwrap file for merge-conflict
kieferrm Jun 30, 2017
610a6f9
Fix doc comment spelling errors in problemMatcher.ts
dlech Jun 30, 2017
b258f0d
Fix #29958 - builtin PHP extension fails to activate
roblourens Jun 30, 2017
c3643f0
Updating version to absorb the change in url
ramya-rao-a Jun 30, 2017
fb52a0e
remove dev dependencies from shrinkwrap
kieferrm Jun 30, 2017
7cd1753
Updated comments on emmet settings
ramya-rao-a Jun 30, 2017
04db7c3
Remove devDependencies from npm-shrinkwrap
roblourens Jun 30, 2017
b36b00f
Updated comments on the new emmet settings
ramya-rao-a Jun 30, 2017
f49482b
Update ThirdPartyNotices.txt
roblourens Jun 30, 2017
bd742fc
disable emmet 2.0 for stable; fixes #29908
kieferrm Jun 30, 2017
854c69a
disable autoIndent for stable
kieferrm Jun 30, 2017
3075108
re-enable autoIndent
kieferrm Jun 30, 2017
782533e
re-enable emmet 2.0
kieferrm Jun 30, 2017
19961c2
Indent cases should specify autoIndent option
rebornix Jun 30, 2017
bf303b9
Update "distro" key
roblourens Jun 30, 2017
222ed5b
Reset JavaScript expression coloring in template expressions (#29966)
mjbvz Jun 30, 2017
478365b
Uplevel xterm.js
Tyriar Jul 1, 2017
a93c51a
classifier: andre for debug issues
isidorn Jul 3, 2017
bbfcefb
Integrate smoketest-express project tasks 2.0 changes.
michelkaporin Jul 3, 2017
bf939ff
debug: only check id when launching preLaunchTask
isidorn Jul 3, 2017
794b4ee
debug: fix wording
isidorn Jul 3, 2017
ccda5dc
tfs: debug linux unix tests
joaomoreno Jul 3, 2017
1452fb9
Merge pull request #29963 from dlech/patch-4
dbaeumer Jul 3, 2017
33e251c
bump to 1.15.0
bpasero Jul 3, 2017
a76af8a
TypeError: expressionForRoot is not a function (fixes #30034)
bpasero Jul 3, 2017
933e0c0
"Deleted from disk" indicator is removed once any new file event kick…
bpasero Jul 3, 2017
f0f6038
simplify unnecessary Math.min (#29902)
nicksnyder Jul 3, 2017
8903b77
update linux build agent
joaomoreno Jul 3, 2017
a6a0d8c
disable xvfb-run
joaomoreno Jul 3, 2017
c2fa7f6
tfs: linux, remove xvfb-run support
joaomoreno Jul 3, 2017
b31643d
Merge branch 'linux-unit-tests'
joaomoreno Jul 3, 2017
073d279
Merge branch 'master' into proxy-auth
joaomoreno Jul 3, 2017
a4667bf
Merge pull request #22369 from joaomoreno/proxy-auth
joaomoreno Jul 3, 2017
0ba14ef
Merge with upstream master
codeguy Jul 3, 2017
bbcd286
First tests, cannot fetch stdout of spawned validator process
codeguy Apr 27, 2017
deff488
Remove custom stdio array from test code
nmcjosh Apr 27, 2017
dd3a219
Add child process callback to report exit code, signal
nmcjosh Apr 28, 2017
7720319
Progress after inspecting stderr
nmcjosh Apr 28, 2017
63326e0
More progress, paths being auto converted back to C: style?
nmcjosh Apr 28, 2017
e777481
WOOOOOO VICTORY
nmcjosh Apr 28, 2017
a24f508
Re-enable lines that I removed earlier
nmcjosh Apr 28, 2017
fbf8e63
Hook up php shell validate settings
nmcjosh Apr 28, 2017
2af116f
Standardize PHP validator settings
codeguy Apr 28, 2017
14f7c48
Let shellExecutable respect current platform
codeguy May 7, 2017
54d2f92
Update PHP validator NLS labels
codeguy May 7, 2017
fa405c6
Use ComSpec
codeguy Jul 3, 2017
48e3d15
Fix merge conflicts
codeguy Jul 3, 2017
a3cfa60
Fix msys assignment in func scope
codeguy Jul 3, 2017
9676d00
Fix cmd and powershell shell args
codeguy Jul 3, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions extensions/php/src/features/validationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as vscode from 'vscode';
import { ThrottledDelayer } from './utils/async';

import * as nls from 'vscode-nls';

let localize = nls.loadMessageBundle();

export class LineDecoder {
Expand Down Expand Up @@ -97,15 +98,17 @@ export default class PHPValidationProvider {
private diagnosticCollection: vscode.DiagnosticCollection;
private delayers: { [key: string]: ThrottledDelayer<void> };

private platform: string;
private runInShell: boolean = false;
private shellExecutable: string = 'C:\\Windows\\sysnative\\bash.exe';
private shellExecutable: string;
private shellArgs: string[] = ['-c'];

constructor(private workspaceStore: vscode.Memento) {
this.executable = null;
this.validationEnabled = true;
this.trigger = RunTrigger.onSave;
this.pauseValidation = false;
this.platform = process.platform;
}

public activate(subscriptions: vscode.Disposable[]) {
Expand Down Expand Up @@ -147,6 +150,11 @@ export default class PHPValidationProvider {
let shellSettings = section.get<any>('validate.runInShell');
if (typeof(shellSettings) === 'boolean') {
this.runInShell = shellSettings;
if (this.platform.toLowerCase() === 'win32') {
this.shellExecutable = 'C:\\Windows\\sysnative\\bash.exe';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can't assume that a user wants the bash if runInShell is set to true. I would expect that the user wants to use what is defined in ComSpec under Windows.

And then we need to set the shellArgs accordingly as well since -c will not work with cmd.exe nor with powershell.exe. For cmd.exe this is /C and for PowerShell it is /Command

} else {
this.shellExecutable = process.env.SHELL || '/bin/bash';
}
} else if (typeof(shellSettings) === 'object') {
this.runInShell = true;
if (shellSettings.shellExecutable && typeof(shellSettings.shellExecutable) === 'string') {
Expand Down Expand Up @@ -277,10 +285,12 @@ export default class PHPValidationProvider {
// Shell args
let executableArgs = args.slice(0);

// Transform Windows file path to Linux file path
let windowsPath = executableArgs.pop();
let linuxPath = windowsPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/');
executableArgs.push(linuxPath);
// If win32 and bash.exe, transform Windows file path to Linux file path
if (this.platform === 'win32' && executable.indexOf('bash.exe') !== -1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't simply test bash.exe here since git under Window installs a bash.exe as well. We either need to test for the full path or better see how bash from git mount the drive and do the path magic as well.

let windowsPath = executableArgs.pop();
let linuxPath = windowsPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/');
executableArgs.push(linuxPath);
}

// Finalize executable args
args = this.shellArgs.concat(['"', executableInShell, executableArgs.join(' '), '"']);
Expand Down