File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,14 +87,14 @@ if docker compose ps --format '{{.Status}}' vc-lodestar 2>/dev/null | grep -qi r
8787 exit 1
8888fi
8989
90- # Create output directory if it doesn't exist
90+ # Make paths absolute for docker bind mount
91+ if [[ " $OUTPUT_FILE " != /* ]]; then
92+ OUTPUT_FILE=" $( pwd) /$OUTPUT_FILE "
93+ fi
9194OUTPUT_DIR=$( dirname " $OUTPUT_FILE " )
92- mkdir -p " $OUTPUT_DIR "
9395
94- # Make OUTPUT_DIR absolute for docker bind mount
95- if [[ " $OUTPUT_DIR " != /* ]]; then
96- OUTPUT_DIR=" $( pwd) /$OUTPUT_DIR "
97- fi
96+ # Create output directory if it doesn't exist
97+ mkdir -p " $OUTPUT_DIR "
9898
9999echo " Exporting slashing protection data using vc-lodestar container..."
100100
@@ -112,8 +112,13 @@ if ! docker compose run --rm -T \
112112 exit 1
113113fi
114114
115- # Move to correct output file if different from default
115+ # Fix file ownership (docker creates it as root)
116116EXPORTED_FILE=" $OUTPUT_DIR /slashing-protection.json"
117+ if [ -f " $EXPORTED_FILE " ]; then
118+ sudo chown " $( id -u) :$( id -g) " " $EXPORTED_FILE "
119+ fi
120+
121+ # Move to correct output file if different from default
117122if [ " $EXPORTED_FILE " != " $OUTPUT_FILE " ]; then
118123 mv " $EXPORTED_FILE " " $OUTPUT_FILE "
119124fi
You can’t perform that action at this time.
0 commit comments