MCPcopy
hub / github.com/webpack/webpack / checkSymlinkExistsAsync

Function checkSymlinkExistsAsync

setup/setup.js:45–61  ·  view source on GitHub ↗

* @returns {Promise<boolean>} result

()

Source from the content-addressed store, hash-verified

43 * @returns {Promise<boolean>} result
44 */
45function checkSymlinkExistsAsync() {
46 return new Promise((resolve) => {
47 try {
48 if (
49 fs.existsSync(nodeModulesFolder) &&
50 fs.existsSync(webpackDependencyFolder) &&
51 fs.lstatSync(webpackDependencyFolder).isSymbolicLink()
52 ) {
53 resolve(true);
54 } else {
55 resolve(false);
56 }
57 } catch {
58 resolve(false);
59 }
60 });
61}
62
63/**
64 * @returns {Promise<void>} result

Callers 1

setupFunction · 0.85

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected