Skip to main content
Level 3
June 10, 2021
Respondido

Failed to run gcloud command

  • June 10, 2021
  • 2 respostas
  • 1414 Visualizações

I installed the gcloud sdk in AC server, and I can run the 'gcloud -v' by the user 'neolane' in the command console:

 

 

But it always failed to run in Adobe campaign by the execCommand method:

 

var command='gcloud -v';
try{
var res=execCommand(command,true);
} catch(e){
logError("Error: "+e);
}

logInfo(">>"+res)

 

Error logs:

 

Does anyone know reason why the command cannot be executed by the same user in the same server? thanks!

Este tópico foi fechado para respostas.
Melhor resposta por Jonathon_wodnicki

Hi,

 

The gcloud command isn't in neolane's PATH env var.

Use the absolute path for it, e.g. /opt/gcloud/bin/gcloud (`which gcloud` to get the path), or add the path for it to customer.sh (env.sh if that's missing).

 

Thanks,

-Jon

2 Respostas

Jonathon_wodnicki
Community Advisor
Community Advisor
June 11, 2021

Hi,

 

The gcloud command isn't in neolane's PATH env var.

Use the absolute path for it, e.g. /opt/gcloud/bin/gcloud (`which gcloud` to get the path), or add the path for it to customer.sh (env.sh if that's missing).

 

Thanks,

-Jon

Level 3
June 17, 2021
Yes, you are right. I've solved the problem in the same way