Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove fallback to ~master on dub fetch, fix #2679 #2763

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions source/dub/commandline.d
Original file line number Diff line number Diff line change
Expand Up @@ -2176,8 +2176,7 @@ class FetchCommand : FetchRemoveCommand {
}
catch(Exception e){
logInfo("Getting a release version failed: %s", e.msg);
logInfo("Retry with ~master...");
dub.fetch(name, VersionRange.fromString("~master"), location, fetchOpts);
return 1;
}
}
return 0;
Expand Down
3 changes: 2 additions & 1 deletion source/dub/dub.d
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,8 @@ class Dub {
logDebug("Full error: %s", e.toString().sanitize());
}
}
enforce(pinfo.type != Json.Type.undefined, "No package "~packageId~" was found matching the dependency " ~ range.toString());
enforce(!pinfo.type.among(Json.Type.undefined, Json.Type.null_),
"No package " ~ packageId ~ " was found matching the dependency " ~ range.toString());
Version ver = Version(pinfo["version"].get!string);

// always upgrade branch based versions - TODO: actually check if there is a new commit available
Expand Down
Loading