diff --git a/config/config.go b/config/config.go index dfebbb4..44b84a6 100644 --- a/config/config.go +++ b/config/config.go @@ -128,6 +128,10 @@ func Load() { } AppConfig = GetFreshConfig() + + if AppConfig.TinkerTimeout == 0 { + AppConfig.TinkerTimeout = defaultTinkerTimeout + } } func GetCurrentProject() ProjectConfig { diff --git a/config/defaults.go b/config/defaults.go index 4aa4b59..1f5e0df 100644 --- a/config/defaults.go +++ b/config/defaults.go @@ -6,13 +6,14 @@ import ( ) const DefaultCommand = "php artisan tinker" +const defaultTinkerTimeout = 4 func setDefaults() { defaultProjectId := project.GetNewId() projectDef := "projects." + defaultProjectId viper.Set("currentproject", defaultProjectId) - viper.Set("tinkerTimeout", 2) + viper.Set("tinkerTimeout", defaultTinkerTimeout) viper.Set(projectDef+".id", defaultProjectId) viper.Set(projectDef+".command", DefaultCommand) viper.Set(projectDef+".name", "Unnamed")