mirror of https://github.com/cirruslabs/tart.git
tart pull: be more liberal when accepting local image as argument (#70)
* tart pull: be more liberal when accepting local image as argument * Update Sources/tart/Commands/Pull.swift Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com> * Single sentence and consistent capitalization Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
This commit is contained in:
parent
b39c3c9b52
commit
d1bed25023
|
|
@ -10,6 +10,14 @@ struct Pull: AsyncParsableCommand {
|
|||
|
||||
func run() async throws {
|
||||
do {
|
||||
// Be more liberal when accepting local image as argument,
|
||||
// see https://github.com/cirruslabs/tart/issues/36
|
||||
if VMStorageLocal().exists(remoteName) {
|
||||
print("\"\(remoteName)\" is a local image, nothing to pull here!")
|
||||
|
||||
Foundation.exit(0)
|
||||
}
|
||||
|
||||
let remoteName = try RemoteName(remoteName)
|
||||
let registry = try Registry(host: remoteName.host, namespace: remoteName.namespace)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue