Skip to content

Commit e03f269

Browse files
committed
ci: Add debug workflow to inspect Windows sha256sum line endings
1 parent a2e75c6 commit e03f269

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: debug-windows-line-endings
2+
3+
on:
4+
push:
5+
branches:
6+
- 'beeklimt/debug-windows-line-endings'
7+
workflow_dispatch:
8+
9+
jobs:
10+
inspect:
11+
runs-on: windows-2022
12+
steps:
13+
- name: Inspect sha256sum output bytes on Git Bash
14+
shell: bash
15+
run: |
16+
set -e
17+
18+
printf 'one\n' > one.bin
19+
printf 'two\n' > two.bin
20+
printf 'three\n' > three.bin
21+
22+
echo
23+
echo '==== raw sha256sum stdout (od -c) ===='
24+
sha256sum one.bin two.bin three.bin | od -c
25+
26+
echo
27+
echo '==== base64 round-trip via env var (mirrors GITHUB_OUTPUT path) ===='
28+
HASHES_WINDOWS=$(sha256sum one.bin two.bin three.bin | base64 -w0)
29+
echo "$HASHES_WINDOWS" | base64 -d > checksums.txt
30+
od -c checksums.txt
31+
echo "wc -l: $(wc -l < checksums.txt), file size: $(wc -c < checksums.txt)"
32+
33+
echo
34+
echo '==== Node os.EOL on this runner ===='
35+
node -e "console.log(JSON.stringify(require('os').EOL))"

0 commit comments

Comments
 (0)