Fix dfinit issue when containerd config_path have multiple paths (#895)
* Fix dfinit issue when containerd config_path have multiple paths * Update containerd.rs - lint fix
This commit is contained in:
parent
ea2d3fbd5d
commit
d6b613e333
|
|
@ -66,6 +66,9 @@ impl Containerd {
|
||||||
.and_then(|config_path| config_path.as_str())
|
.and_then(|config_path| config_path.as_str())
|
||||||
.filter(|config_path| !config_path.is_empty())
|
.filter(|config_path| !config_path.is_empty())
|
||||||
{
|
{
|
||||||
|
// Rebind config_path to the first entry if multiple paths are present
|
||||||
|
let config_path = config_path.split(':').next().unwrap_or(config_path);
|
||||||
|
|
||||||
info!(
|
info!(
|
||||||
"containerd supports config_path mode, config_path: {}",
|
"containerd supports config_path mode, config_path: {}",
|
||||||
config_path.to_string()
|
config_path.to_string()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue