Skip to content

Commit

Permalink
add cwd to user script launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaits committed Dec 6, 2023
1 parent 5a4dcca commit c991c71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion import-automation/executor/app/executor/import_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,8 @@ def _run_with_timeout_async(args: List[str],
"""
try:
logging.info(
f'Launching async command: {args} with timeout {timeout} in {cwd}')
f'Launching async command: {args} with timeout {timeout} in {cwd}, env: {env}'
)
start_time = time.time()
stdout = []
stderr = []
Expand Down
5 changes: 4 additions & 1 deletion import-automation/executor/local_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
and 'data' is the repo_name.
"""

import os

from absl import flags
from absl import app

Expand Down Expand Up @@ -85,7 +87,8 @@ def main(_):
github_repo_name=FLAGS.repo_name,
github_repo_owner_username=FLAGS.owner_username,
github_auth_username=FLAGS.username,
github_auth_access_token=FLAGS.access_token)
github_auth_access_token=FLAGS.access_token,
user_script_env=os.environ)
executor = import_executor.ImportExecutor(
uploader=file_uploader.LocalFileUploader(output_dir=FLAGS.output_dir),
github=github_api.GitHubRepoAPI(config.github_repo_owner_username,
Expand Down

0 comments on commit c991c71

Please sign in to comment.