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

Add default package provider info for FreeBSD and DragonFly BSD #147

Merged
merged 3 commits into from
Mar 14, 2022
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
2 changes: 1 addition & 1 deletion src/actions/package/providers/bsdpkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl PackageProvider for BsdPkg {
Step {
atom: Box::new(Exec {
command: String::from("/usr/sbin/pkg"),
arguments: vec![String::from("install")]
arguments: vec![String::from("install"), String::from("-y")]
.into_iter()
.chain(package.extra_args.clone())
.chain(package.packages())
Expand Down
10 changes: 7 additions & 3 deletions src/actions/package/providers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ impl Default for PackageProviders {
let info = os_info::get();

match info.os_type() {
// Arch Variants
os_info::Type::Arch=> PackageProviders::Yay,
os_info::Type::Manjaro=> PackageProviders::Yay,
// BSD operating systems
os_info::Type::DragonFly=> PackageProviders::BsdPkg,
os_info::Type::FreeBSD=> PackageProviders::BsdPkg,
// Debian / Ubuntu Variants
os_info::Type::Debian => PackageProviders::Aptitude,
os_info::Type::Mint => PackageProviders::Aptitude,
Expand All @@ -55,11 +61,9 @@ impl Default for PackageProviders {
// For some reason, the Rust image is showing as this and
// its Debian based?
os_info::Type::OracleLinux => PackageProviders::Aptitude,
// Other
os_info::Type::Macos => PackageProviders::Homebrew,
os_info::Type::Windows => PackageProviders::Winget,
// Arch Variants
os_info::Type::Manjaro=> PackageProviders::Yay,
os_info::Type::Arch=> PackageProviders::Yay,

_ => panic!("Sorry, but we don't have a default provider for {} OS. Please be explicit when requesting a package installation with `provider: XYZ`.", info.os_type()),
}
Expand Down