Skip to content

Commit e6a925e

Browse files
committed
which: simplify
1 parent b17eeee commit e6a925e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

+stdlib/which.m

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222

2323
%% on Windows, append .exe if not suffix is given
2424
if ispc() && strempty(stdlib.suffix(cmd))
25-
pathext = '.exe';
26-
if ~endsWith(cmd, pathext, IgnoreCase=true)
27-
cmd = strcat(cmd, pathext);
28-
end
25+
cmd = strcat(cmd, '.exe');
2926
end
3027
%% full filename was given
3128
if isfile(cmd) && stdlib.is_exe(cmd)

0 commit comments

Comments
 (0)