forked from vieter-v/vieter
Changed behavior for default_arch variable
This commit is contained in:
parent
6479071fd7
commit
9d8491a77a
6 changed files with 21 additions and 13 deletions
|
|
@ -20,6 +20,11 @@ pub mut:
|
|||
|
||||
// server starts the web server & starts listening for requests
|
||||
pub fn server(conf Config) ? {
|
||||
// Prevent using 'any' as the default arch
|
||||
if conf.default_arch == 'any' {
|
||||
util.exit_with_message(1, "'any' is not allowed as the value for default_arch.")
|
||||
}
|
||||
|
||||
// Configure logger
|
||||
log_level := log.level_from_tag(conf.log_level) or {
|
||||
util.exit_with_message(1, 'Invalid log level. The allowed values are FATAL, ERROR, WARN, INFO & DEBUG.')
|
||||
|
|
@ -39,7 +44,7 @@ pub fn server(conf Config) ? {
|
|||
}
|
||||
|
||||
// This also creates the directories if needed
|
||||
repo := repo.new(conf.data_dir, conf.pkg_dir, 'x86_64') or {
|
||||
repo := repo.new(conf.data_dir, conf.pkg_dir, conf.default_arch) or {
|
||||
logger.error(err.msg)
|
||||
exit(1)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue