backend name is now package manager name, error if incorrect in conf file
parent
492ce2f9cc
commit
72aceb035d
|
@ -5,7 +5,7 @@ require "../backends.cr"
|
||||||
|
|
||||||
class BaguetteBackend < Package::Backend::Packaging
|
class BaguetteBackend < Package::Backend::Packaging
|
||||||
def initialize
|
def initialize
|
||||||
@name = "baguette"
|
@name = "package"
|
||||||
end
|
end
|
||||||
|
|
||||||
def package(context : Package::Context, package : Package::Package) : Bool
|
def package(context : Package::Context, package : Package::Package) : Bool
|
||||||
|
|
|
@ -283,7 +283,17 @@ class Package::Context
|
||||||
end
|
end
|
||||||
when "package-manager"
|
when "package-manager"
|
||||||
# Targeted package manager (default: package, for BaguetteOS).
|
# Targeted package manager (default: package, for BaguetteOS).
|
||||||
|
begin
|
||||||
self.packaging_backend = value.as_s
|
self.packaging_backend = value.as_s
|
||||||
|
rescue e
|
||||||
|
STDERR.puts "Error during selecting packaging backend: #{e}"
|
||||||
|
STDERR.puts "#{value.as_s} seems not to be a valid backend"
|
||||||
|
STDERR.puts "valid backends:"
|
||||||
|
@packaging_backends.each do |backend|
|
||||||
|
STDERR.puts "- #{backend.name}"
|
||||||
|
end
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue