Skip empty lines and comments in link-config file (#32589)
This commit is contained in:
@@ -27,6 +27,7 @@ try {
|
|||||||
|
|
||||||
const configFile = await fs.readFile(configPath, "utf-8");
|
const configFile = await fs.readFile(configPath, "utf-8");
|
||||||
for (const line of configFile.trim().split("\n")) {
|
for (const line of configFile.trim().split("\n")) {
|
||||||
|
if (!line || line.startsWith("#")) continue;
|
||||||
const [dependency, path] = line.split("=");
|
const [dependency, path] = line.split("=");
|
||||||
const dependencyPath = join(nodeModulesPath, dependency);
|
const dependencyPath = join(nodeModulesPath, dependency);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user