Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
The way default names were handled changed, but this comment was never
updated.
  • Loading branch information
tobil4sk committed Aug 24, 2022
1 parent dd721e4 commit 4652b66
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/haxelib/api/GlobalScope.hx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ class GlobalScope extends Scope {

final info = {
final jsonContent = try File.getContent(resolved.path + Data.JSON) catch (_) null;
// `library` (i.e. the .name value) will be used as the name if haxelib.json has no "name" field
Data.readData(jsonContent, jsonContent != null ? CheckSyntax : NoCheck, library);
}

Expand All @@ -182,8 +183,6 @@ class GlobalScope extends Scope {
else
resolved.path
);
// if info.name is not the placeholder for an empty name (i.e. unknown), use it, otherwise
// fall back to the value in the .name file
addLine('-D ${info.name}=${info.version}');

// add dependencies to stack
Expand Down

0 comments on commit 4652b66

Please sign in to comment.