Skip to content

Commit

Permalink
Fix uninit variable check
Browse files Browse the repository at this point in the history
  • Loading branch information
yannayl authored Feb 4, 2025
1 parent 3ea26e7 commit c0f7196
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/yarnpkg-core/sources/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,7 @@ export class Configuration {
} catch (error) {
let tip = ``;

if (content.match(/^\s+(?!-)[^:]+\s+\S+/m))
if (content?.match(/^\s+(?!-)[^:]+\s+\S+/m))
tip = ` (in particular, make sure you list the colons after each key name)`;

throw new UsageError(`Parse error when loading ${rcPath}; please check it's proper Yaml${tip}`);
Expand Down

0 comments on commit c0f7196

Please sign in to comment.