Expand my Community achievements bar.

SOLVED

Failed to run gcloud command

Avatar

Level 4

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

 

felixsongfei_0-1623307056579.png

 

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:

felixsongfei_1-1623307126459.png

 

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

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

Avatar

Level 4
Yes, you are right. I've solved the problem in the same way