Shell command - error code 127

That’s because shell commands run inside the homeassistant container, but the ha command is not available there.
I’ve verified this with a Home Assistant OS VM:

One possible solution would be to ssh from the container to the host and run your command that way.
There might be a better way to trigger an update, perhaps by calling a service. Unfortunately, I haven’t found one yet.