Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

When running with runTasksAsCurrentUser, no way to know the task directory #112

Open
glandium opened this issue Jul 21, 2018 · 3 comments
Open

Comments

@glandium
Copy link

A task directory is created when a task starts, but, when runTasksAsCurrentUser is set:

  • the task isn't run with the task directory as its current directory
  • there is no environment variable containing the task directory location

So it's essentially impossible to make use of the task directory in that case.

@glandium
Copy link
Author

Mmmm the code in process/process_all-unix-style.go says it should be the working directory...

@glandium
Copy link
Author

So, the problem is that the PWD environment variable in the task is whatever the working directory was when the worker was started. The pwd command returns the right path, but the environment is kind of lying.

@petemoore
Copy link
Member

Thanks for raising! I'll take a look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants