Skip to content

Commit

Permalink
fix a bug when replacing existing containers
Browse files Browse the repository at this point in the history
Signed-off-by: jason yang <[email protected]>
  • Loading branch information
JasonYangShadow committed Dec 12, 2023
1 parent 9c698d7 commit efcffbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed a bug where profile tags were erroneously overridden by empty node
values. #884
- Fixed bug where tags from profiles weren't rendered #967
- Fixed a bug when using `wwctl container import --force` to replace an existing container
will generate an error #474

### Changed

Expand Down
4 changes: 3 additions & 1 deletion internal/pkg/api/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ func ContainerImport(cip *wwapiv1.ContainerImportParameter) (containerName strin
wwlog.Error(err.Error())
return
}
} else if strings.HasPrefix(cip.Source, "docker://") || strings.HasPrefix(cip.Source, "docker-daemon://") ||
}

if strings.HasPrefix(cip.Source, "docker://") || strings.HasPrefix(cip.Source, "docker-daemon://") ||
strings.HasPrefix(cip.Source, "file://") || util.IsFile(cip.Source) {
var sCtx *types.SystemContext
sCtx, err = getSystemContext()
Expand Down

0 comments on commit efcffbd

Please sign in to comment.