MCPcopy Create free account
hub / github.com/angular/dev-infra / __awaiter3

Function __awaiter3

github-actions/browserstack/set-browserstack-env.js:19956–19982  ·  view source on GitHub ↗
(thisArg, _arguments, P, generator)

Source from the content-addressed store, hash-verified

19954 return true;
19955 });
19956 }
19957 function isRooted(p) {
19958 p = normalizeSeparators(p);
19959 if (!p) {
19960 throw new Error('isRooted() parameter "p" cannot be empty');
19961 }
19962 if (IS_WINDOWS) {
19963 return p.startsWith("\\") || /^[A-Z]:/i.test(p);
19964 }
19965 return p.startsWith("/");
19966 }
19967 function tryGetExecutablePath(filePath, extensions) {
19968 return __awaiter2(this, void 0, void 0, function* () {
19969 let stats = void 0;
19970 try {
19971 stats = yield stat(filePath);
19972 } catch (err) {
19973 if (err.code !== "ENOENT") {
19974 console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
19975 }
19976 }
19977 if (stats && stats.isFile()) {
19978 if (IS_WINDOWS) {
19979 const upperExt = path.extname(filePath).toUpperCase();
19980 if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) {
19981 return filePath;
19982 }
19983 } else {
19984 if (isUnixExecutable(stats)) {
19985 return filePath;

Callers 2

whichFunction · 0.70
findInPathFunction · 0.70

Calls 3

stepFunction · 0.70
nextMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected