Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dschaller committed Sep 6, 2024
1 parent 5dab5cd commit 4718946
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/esc/cli/env_clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ func newEnvCloneCmd(env *envCommand) *cobra.Command {
return err
}

ref, args, err := env.getExistingEnvRef(ctx, args)
ref, args, _ := env.getExistingEnvRef(ctx, args)
// An error will arise if an environment reference is ambiguous and can't be
// resolved to a single environment. The ref for the non-legacy environment will
// also be returned in this case.
// If the original ref is using a legacy ID of just env name return an error
// Otherwise we will ignore any conflict errors and assume the user meant <project-name>/<env-name>
if (err != nil && ref.isUsingLegacyID) || ref.isUsingLegacyID {
return errors.New("source environment ID must be at least <project-name>/<env-name>")
if ref.isUsingLegacyID {
return errors.New("referring to an environment name ('env' or 'org/env') without a project is not supported")
}

if ref.version != "" {
Expand Down

0 comments on commit 4718946

Please sign in to comment.