@@ -390,7 +390,7 @@ func makeDefaultExtra() []byte {
390390}
391391
392392func run (ctx * cli.Context ) {
393- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
393+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
394394 if ctx .GlobalBool (utils .OlympicFlag .Name ) {
395395 utils .InitOlympic ()
396396 }
@@ -409,7 +409,7 @@ func run(ctx *cli.Context) {
409409}
410410
411411func attach (ctx * cli.Context ) {
412- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
412+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
413413
414414 var client comms.EthereumClient
415415 var err error
@@ -441,7 +441,7 @@ func attach(ctx *cli.Context) {
441441}
442442
443443func console (ctx * cli.Context ) {
444- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
444+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
445445
446446 cfg := utils .MakeEthConfig (ClientIdentifier , nodeNameVersion , ctx )
447447 cfg .ExtraData = makeExtra (ctx )
@@ -475,7 +475,7 @@ func console(ctx *cli.Context) {
475475}
476476
477477func execJSFiles (ctx * cli.Context ) {
478- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
478+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
479479
480480 cfg := utils .MakeEthConfig (ClientIdentifier , nodeNameVersion , ctx )
481481 ethereum , err := eth .New (cfg )
@@ -502,7 +502,7 @@ func execJSFiles(ctx *cli.Context) {
502502}
503503
504504func unlockAccount (ctx * cli.Context , am * accounts.Manager , addr string , i int ) (addrHex , auth string ) {
505- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
505+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
506506
507507 var err error
508508 addrHex , err = utils .ParamToAddress (addr , am )
@@ -527,7 +527,7 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int) (
527527}
528528
529529func blockRecovery (ctx * cli.Context ) {
530- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
530+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
531531
532532 arg := ctx .Args ().First ()
533533 if len (ctx .Args ()) < 1 && len (arg ) > 0 {
@@ -593,7 +593,7 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) {
593593}
594594
595595func accountList (ctx * cli.Context ) {
596- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
596+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
597597
598598 am := utils .MakeAccountManager (ctx )
599599 accts , err := am .Accounts ()
@@ -643,7 +643,7 @@ func getPassPhrase(ctx *cli.Context, desc string, confirmation bool, i int) (pas
643643}
644644
645645func accountCreate (ctx * cli.Context ) {
646- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
646+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
647647
648648 am := utils .MakeAccountManager (ctx )
649649 passphrase := getPassPhrase (ctx , "Your new account is locked with a password. Please give a password. Do not forget this password." , true , 0 )
@@ -655,7 +655,7 @@ func accountCreate(ctx *cli.Context) {
655655}
656656
657657func accountUpdate (ctx * cli.Context ) {
658- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
658+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
659659
660660 am := utils .MakeAccountManager (ctx )
661661 arg := ctx .Args ().First ()
@@ -672,7 +672,7 @@ func accountUpdate(ctx *cli.Context) {
672672}
673673
674674func importWallet (ctx * cli.Context ) {
675- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
675+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
676676
677677 keyfile := ctx .Args ().First ()
678678 if len (keyfile ) == 0 {
@@ -694,7 +694,7 @@ func importWallet(ctx *cli.Context) {
694694}
695695
696696func accountImport (ctx * cli.Context ) {
697- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
697+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
698698
699699 keyfile := ctx .Args ().First ()
700700 if len (keyfile ) == 0 {
@@ -710,7 +710,7 @@ func accountImport(ctx *cli.Context) {
710710}
711711
712712func makedag (ctx * cli.Context ) {
713- utils .CheckLegalese (ctx . GlobalString ( utils .DataDirFlag . Name ))
713+ utils .CheckLegalese (utils .MustDataDir ( ctx ))
714714
715715 args := ctx .Args ()
716716 wrongArgs := func () {
0 commit comments