Chromium Code Reviews| Index: lib/src/global_packages.dart |
| diff --git a/lib/src/global_packages.dart b/lib/src/global_packages.dart |
| index 86ed14792d81b209ea5a77845a7f51b119ca6eda..4d1b7d390692fd1537962d92e54e7f98e193cef4 100644 |
| --- a/lib/src/global_packages.dart |
| +++ b/lib/src/global_packages.dart |
| @@ -770,7 +770,11 @@ pub global run ${package.name}:$script "\$@" |
| 'A web search for "configure windows path" will show you how.'); |
| } else { |
| // See if the shell can find one of the binstubs. |
| - var result = runProcessSync("which", [installed]); |
| + // |
| + // The "command" builtin is more reliable than the "which" executable. See |
| + // http://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then |
| + var result = runProcessSync("sh", ["-c", 'command -v "\$installed"'], |
|
kevmoo
2016/07/14 21:22:13
...or just add 'runInShell: true' ?
nweiz
2016/07/14 22:06:56
Haha good idea!
|
| + environment: {"installed": installed}); |
| if (result.exitCode == 0) return; |
| var binDir = _binStubDir; |