Skip to content

Commit 0ca833b

Browse files
yarikoptickyleam
authored andcommitted
BF: runscript - only consider statuses for success/failure
When running the usecase example ReproNimgh-438, the working tree is coming up as unexpectedly dirty, including the change of status files from empty to "succeed", apparently indicating that the content of the file is not flushed at the time of the 'datalad add/save' call. To prevent saving before the content is flushed, don't count a status file unless it has the content. Modified-by: Kyle Meyer <[email protected]> Add commit message body, and dropped `find` call, as suggested by @yarikoptic.
1 parent b831c10 commit 0ca833b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reproman/support/jobs/job_templates/runscript/base.template.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ then
5353
# least for now, below is a brittle solution were the last job waits until it
5454
# sees that all other jobs have exited and then runs the post-command stuff.
5555
nstatus () {
56-
find "$metadir" -regex '.*/status\.[0-9][0-9]*' | wc -l
56+
grep -E '^(succeed|fail)' "$metadir"/status.* | wc -l
5757
}
5858

5959
# Ugly, but this sleep makes it less likely for the post-command tar to fail

0 commit comments

Comments
 (0)