[#483] cli: Fix object put cmd with flag --prepare-locally
All checks were successful
Build / Build Components (1.20) (pull_request) Successful in 3m31s
Build / Build Components (1.19) (pull_request) Successful in 3m46s
ci/woodpecker/pr/pre-commit Pipeline was successful
Tests and linters / Tests with -race (pull_request) Successful in 5m2s
Tests and linters / Tests (1.20) (pull_request) Successful in 5m28s
Tests and linters / Lint (pull_request) Successful in 9m28s
Tests and linters / Tests (1.19) (pull_request) Successful in 13m46s
ci/woodpecker/push/pre-commit Pipeline was successful

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2023-07-04 18:41:25 +03:00
parent 4c248d573e
commit b520a3049e

View file

@ -105,6 +105,7 @@ func putObject(cmd *cobra.Command, _ []string) {
var prm internalclient.PutObjectPrm
if prepareLocally, _ := cmd.Flags().GetBool(prepareLocallyFlag); prepareLocally {
prm.SetClient(internalclient.GetSDKClientByFlag(cmd, pk, commonflags.RPC))
prm.PrepareLocally()
} else {
ReadOrOpenSession(cmd, &prm, pk, cnr, nil)