File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import (
2222 "path/filepath"
2323 "strings"
2424
25+ "github.com/cortexlabs/cortex/pkg/lib/errors"
2526 "github.com/cortexlabs/cortex/pkg/lib/exit"
2627 s "github.com/cortexlabs/cortex/pkg/lib/strings"
2728 "github.com/cortexlabs/cortex/pkg/lib/telemetry"
@@ -45,18 +46,21 @@ var _flagEnv string
4546func init () {
4647 cwd , err := os .Getwd ()
4748 if err != nil {
49+ err := errors .Wrap (err , "unable to determine current working directory" )
4850 exit .Error (err )
4951 }
5052 _cwd = s .EnsureSuffix (cwd , "/" )
5153
5254 homeDir , err := homedir .Dir ()
5355 if err != nil {
56+ err := errors .Wrap (err , "unable to determine home directory" )
5457 exit .Error (err )
5558 }
5659
5760 _localDir = filepath .Join (homeDir , ".cortex" )
5861 err = os .MkdirAll (_localDir , os .ModePerm )
5962 if err != nil {
63+ err := errors .Wrap (err , "unable to write to home directory" , _localDir )
6064 exit .Error (err )
6165 }
6266
You can’t perform that action at this time.
0 commit comments