Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Failed to run gcloud command

felixsongfei
Level 3
Level 3

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
Jonathon_wodnicki
Correct answer by
Community Advisor
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

1 Reply
Jonathon_wodnicki
Correct answer by
Community Advisor
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

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