Skip to content

Commit

Permalink
fix: no such file or directory
Browse files Browse the repository at this point in the history
  • Loading branch information
gitslagga committed Feb 8, 2022
1 parent 778165c commit 173ea3d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
7 changes: 4 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ func initConfig() {

func Execute() {
// Gen markdown files
err := doc.GenMarkdownTree(rootCmd, "./doc")
if err != nil {
cobra.CheckErr(fmt.Errorf("GenMarkdown err: %v ", err.Error()))
if _, err := os.Stat("./doc"); err == nil {
if err = doc.GenMarkdownTree(rootCmd, "./doc"); err != nil {
cobra.CheckErr(fmt.Errorf("GenMarkdown err: %v ", err.Error()))
}
}

if err := rootCmd.Execute(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion doc/tx_parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Command tool for the das parser on the ckb blockchain.
* [tx_parser version](tx_parser_version.md) - Print the version number of Das parser tool
* [tx_parser witness](tx_parser_witness.md) - Parser transaction by witness

###### Auto generated by spf13/cobra on 28-Jan-2022
###### Auto generated by spf13/cobra on 8-Feb-2022
2 changes: 1 addition & 1 deletion doc/tx_parser_hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ tx_parser hash [flags]

* [tx_parser](tx_parser.md) - Command tool for the das parser on the ckb blockchain.

###### Auto generated by spf13/cobra on 28-Jan-2022
###### Auto generated by spf13/cobra on 8-Feb-2022
2 changes: 1 addition & 1 deletion doc/tx_parser_json.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Parser transaction by transaction json
* [tx_parser json data](tx_parser_json_data.md) - Parser transaction by transaction json data
* [tx_parser json file](tx_parser_json_file.md) - Parser transaction by transaction json file

###### Auto generated by spf13/cobra on 28-Jan-2022
###### Auto generated by spf13/cobra on 8-Feb-2022
2 changes: 1 addition & 1 deletion doc/tx_parser_json_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ tx_parser json data [flags]

* [tx_parser json](tx_parser_json.md) - Parser transaction by transaction json

###### Auto generated by spf13/cobra on 28-Jan-2022
###### Auto generated by spf13/cobra on 8-Feb-2022
2 changes: 1 addition & 1 deletion doc/tx_parser_json_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ tx_parser json file [flags]

* [tx_parser json](tx_parser_json.md) - Parser transaction by transaction json

###### Auto generated by spf13/cobra on 28-Jan-2022
###### Auto generated by spf13/cobra on 8-Feb-2022
2 changes: 1 addition & 1 deletion doc/tx_parser_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ tx_parser version [flags]

* [tx_parser](tx_parser.md) - Command tool for the das parser on the ckb blockchain.

###### Auto generated by spf13/cobra on 28-Jan-2022
###### Auto generated by spf13/cobra on 8-Feb-2022
2 changes: 1 addition & 1 deletion doc/tx_parser_witness.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ tx_parser witness [flags]

* [tx_parser](tx_parser.md) - Command tool for the das parser on the ckb blockchain.

###### Auto generated by spf13/cobra on 28-Jan-2022
###### Auto generated by spf13/cobra on 8-Feb-2022

0 comments on commit 173ea3d

Please sign in to comment.