Process .yadm/encrypt in sorted order
This commit is contained in:
parent
2848ca2d1d
commit
58edf313aa
2 changed files with 10 additions and 1 deletions
|
@ -140,6 +140,10 @@ def test_file_parse_encrypt(runner, paths):
|
|||
for expected_file in expected:
|
||||
assert f'EIF:{expected_file}\n' in run.out
|
||||
|
||||
sorted_expectations = '\n'.join(
|
||||
[f'EIF:{exp}' for exp in sorted(expected)])
|
||||
assert sorted_expectations in run.out
|
||||
|
||||
|
||||
def run_parse_encrypt(
|
||||
runner, paths,
|
||||
|
@ -162,6 +166,7 @@ def run_parse_encrypt(
|
|||
export YADM_ENCRYPT
|
||||
GIT_DIR={paths.repo}
|
||||
export GIT_DIR
|
||||
LC_ALL=C
|
||||
{parse_cmd}
|
||||
export ENCRYPT_INCLUDE_FILES
|
||||
export PARSE_ENCRYPT_SHORT
|
||||
|
|
6
yadm
6
yadm
|
@ -956,7 +956,11 @@ function parse_encrypt() {
|
|||
done
|
||||
[ -n "$skip" ] || FINAL_INCLUDE+=("$included")
|
||||
done
|
||||
ENCRYPT_INCLUDE_FILES=("${FINAL_INCLUDE[@]}")
|
||||
|
||||
#; sort the encrypted files
|
||||
#shellcheck disable=SC2207
|
||||
IFS=$'\n' ENCRYPT_INCLUDE_FILES=($(sort <<<"${FINAL_INCLUDE[*]}"))
|
||||
unset IFS
|
||||
fi
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue