Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

BitBucket Path error

Paul November 2, 2017

BitBucket 5.4.0

Windows

I have a cmd I am running from my plugin, bit it cannot be found.

It runs fine on the cmd line, and the Windows Path is pointing to where

the cmd is.

Does BitBucket change the PATH env variable at startup (service)?

If so, what file is this set in.

Why can't it find my executable?

 

3 answers

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 4, 2017

Bitbucket, like most services, doesn't use the user's environment on the server because that can be change, it uses an environment built for it as part of the start up scripts.

If you want to run an arbitrary command in your add-on, your add-on  needs to explicitly state where the command is (unless it's embedded in the environment the Bitbucket startup creates)

Check the service settings and the .bat scripts in <bitbucket home>/bin and <bitbucket install>/bin

Paul November 4, 2017

ok thanks, using the whole path to the exe works ok. I can live

with that.

I have a follow up question.

In my plugin I create a tmp directory in which files are copied

into it. Once I am done with it I delete the files. I consistently get access denied when I try to copy the files from within my plugin.

 I can create the tmp directory ok, but no matter where I create

this directory I get access denied.

Why?

0 votes
Paul November 2, 2017

The service is set up and running fine. I am trying to fid out why/where

it changes the PATH. It does not seem to be using the %PATH% env variable

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 2, 2017
Paul November 2, 2017

Sorry , that doc was not very helpful as far as PATH goes.

The service is doing something with the Windows path. Any idea

what file is called that changes the PATH?

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 3, 2017

bat files used you configs, why bitbucket should use extra config PATH? 

In fact, it is not needed

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events