From e85ff2694e43afc03076df94062ef2efe410521b Mon Sep 17 00:00:00 2001 From: Tim Pillinger <26465611+wxtim@users.noreply.github.com> Date: Mon, 13 Jan 2025 11:39:27 +0000 Subject: [PATCH] change to CYLC_TASK_SHARE_CYCLE_DIR --- changes.d/6117.feat.md | 2 +- cylc/flow/etc/job.sh | 4 ++-- tests/functional/jobscript/02-share-cycle-cycle/flow.cylc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/changes.d/6117.feat.md b/changes.d/6117.feat.md index f7affba4337..d78d2227bcf 100644 --- a/changes.d/6117.feat.md +++ b/changes.d/6117.feat.md @@ -1 +1 @@ -Make workflow/share/cycle/ available as CYLC_SHARE_CYCLE_DIR \ No newline at end of file +Make workflow/share/cycle/ available as CYLC_TASK_SHARE_CYCLE_DIR \ No newline at end of file diff --git a/cylc/flow/etc/job.sh b/cylc/flow/etc/job.sh index 110fdc0d24c..353143d74fa 100755 --- a/cylc/flow/etc/job.sh +++ b/cylc/flow/etc/job.sh @@ -95,7 +95,7 @@ cylc__job__main() { CYLC_TASK_WORK_DIR_BASE="${CYLC_TASK_CYCLE_POINT}/${CYLC_TASK_NAME}" fi export CYLC_TASK_WORK_DIR="${CYLC_WORKFLOW_WORK_DIR}/${CYLC_TASK_WORK_DIR_BASE}" - export CYLC_SHARE_CYCLE_DIR="${CYLC_WORKFLOW_SHARE_DIR}/cycle/${CYLC_TASK_CYCLE_POINT}" + export CYLC_TASK_SHARE_CYCLE_DIR="${CYLC_WORKFLOW_SHARE_DIR}/cycle/${CYLC_TASK_CYCLE_POINT}" typeset contact="${CYLC_WORKFLOW_RUN_DIR}/.service/contact" if [[ -f "${contact}" ]]; then # (contact file not present for polled platforms) @@ -136,7 +136,7 @@ cylc__job__main() { export PYTHONPATH="${CYLC_WORKFLOW_RUN_DIR}/share/lib/python:${CYLC_WORKFLOW_RUN_DIR}/lib/python:${PYTHONPATH:-}" # Create share and work directories mkdir -p "${CYLC_WORKFLOW_SHARE_DIR}" || true - mkdir -p "${CYLC_SHARE_CYCLE_DIR}" || true + mkdir -p "${CYLC_TASK_SHARE_CYCLE_DIR}" || true mkdir -p "$(dirname "${CYLC_TASK_WORK_DIR}")" || true mkdir -p "${CYLC_TASK_WORK_DIR}" cd "${CYLC_TASK_WORK_DIR}" diff --git a/tests/functional/jobscript/02-share-cycle-cycle/flow.cylc b/tests/functional/jobscript/02-share-cycle-cycle/flow.cylc index b8d08fe942f..01231bb22a4 100644 --- a/tests/functional/jobscript/02-share-cycle-cycle/flow.cylc +++ b/tests/functional/jobscript/02-share-cycle-cycle/flow.cylc @@ -7,5 +7,5 @@ [runtime] [[task]] script = """ - echo "Hello World" > "${CYLC_SHARE_CYCLE_DIR}/stuff" + echo "Hello World" > "${CYLC_TASK_SHARE_CYCLE_DIR}/stuff" """ \ No newline at end of file