Skip to content

Commit 922f1f5

Browse files
committed
remove WSL functions
1 parent 2b5de28 commit 922f1f5

File tree

7 files changed

+26
-161
lines changed

7 files changed

+26
-161
lines changed

+stdlib/has_wsl.m

Lines changed: 0 additions & 20 deletions
This file was deleted.

+stdlib/is_wsl.m

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
%% IS_WSL detect if running under WSL
2+
% Detects if Matlab or GNU Octave is installed and running from within
3+
% Windows Subsystem for Linux
4+
5+
function w = is_wsl()
6+
7+
persistent wsl;
8+
9+
if isempty(wsl)
10+
wsl = false;
11+
if isunix && ~ismac
12+
fid = fopen('/proc/version');
13+
if fid >= 1
14+
v = fscanf(fid,'%s');
15+
fclose(fid);
16+
wsl = ~isempty(strfind(v, 'microsoft-standard')); %#ok<*STREMP>
17+
end
18+
end
19+
end
20+
21+
w = wsl; % has to be a separate line/variable for matlab
22+
23+
end
24+
25+
%!assert(islogical(is_wsl()))

+stdlib/winpath2wslpath.m

Lines changed: 0 additions & 28 deletions
This file was deleted.

+stdlib/wsl_tempfile.m

Lines changed: 0 additions & 24 deletions
This file was deleted.

+stdlib/wslpath2winpath.m

Lines changed: 0 additions & 21 deletions
This file was deleted.

test/TestSys.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ function test_platform(tc)
1515
tc.verifyThat(stdlib.iscygwin, IsOfClass('logical'))
1616
tc.verifyThat(stdlib.isoctave, IsOfClass('logical'))
1717

18-
tc.verifyThat(stdlib.iswsl, IsOfClass('logical'))
19-
tc.verifyThat(stdlib.has_wsl, IsOfClass('logical'))
18+
tc.verifyThat(stdlib.is_wsl, IsOfClass('logical'))
2019

2120
tc.verifyThat(stdlib.is_rosetta, IsOfClass('logical'))
2221

test/TestWSL.m

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)