[#2000] cli: Provide a bearer token to spawned HEAD by DELETE

If a `neofs-cli object delete` operation is performing using a bearer token,
add it to the new `HEAD` requests that collects children OIDs.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-11-09 16:23:59 +03:00 committed by fyrchik
parent c38ad2d339
commit 110f6e7864
2 changed files with 3 additions and 0 deletions

View file

@ -328,6 +328,8 @@ func collectObjectRelatives(cmd *cobra.Command, cli *client.Client, cnr cid.ID,
prmHead.SetAddress(addrObj)
prmHead.SetRawFlag(true)
Prepare(cmd, &prmHead)
_, err := internal.HeadObject(prmHead)
var errSplit *object.SplitInfoError