Skip to content

Commit c283020

Browse files
authored
Squashed commit of the following: (#124)
commit 78c8d23 Author: wanwiset25 <[email protected]> Date: Wed Dec 20 15:39:23 2023 +0400 puppeth exit with error code when fails commit ef0be66 Author: wanwiset25 <[email protected]> Date: Wed Dec 20 15:25:03 2023 +0400 dockerfile commit 51bc92a Author: wanwiset25 <[email protected]> Date: Tue Dec 19 15:04:33 2023 +0400 add puppeth script
1 parent ecae5a0 commit c283020

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

cmd/puppeth/wizard_genesis_file.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ func (w *wizard) makeGenesisFile() {
9999
configFile, err := ioutil.ReadFile(w.options.filePath)
100100
if err != nil {
101101
fmt.Println("read file error ", err)
102+
os.Exit(1)
102103
return
103104
}
104105
var input = NewGenesisInput()
105106
// Unmarshal our input YAML file
106107
if err := yaml.Unmarshal(configFile, &input); err != nil {
107108
fmt.Println("parse YAML error ", err)
109+
os.Exit(1)
108110
return
109111
}
110112
SetDefaultAfterInputRead(input)

docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ RUN chmod +x /usr/bin/puppeth
2525
# Copy over files
2626
ADD docker/start.sh /work/start.sh
2727
ADD docker/start-bootnode.sh /work/start-bootnode.sh
28+
ADD docker/puppeth.sh /work/puppeth.sh
2829

2930
# Create an empty pwd file
3031
RUN touch /work/.pwd

docker/puppeth.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
puppeth --file /app/generated/genesis_input.yml --out /app/generated/

0 commit comments

Comments
 (0)