chore: capture post-P0/P1 state for clean P2 start (working tree was dirty at task begin)
This commit is contained in:
+19
-1
@@ -108,7 +108,16 @@ var rootCmd = &cobra.Command{
|
||||
finalMaxRequestsPerClient = maxRequestsPerClient
|
||||
}
|
||||
|
||||
sc := steamcache.New(
|
||||
// Validate after loading and applying CLI overrides (fail fast, do not create default on validate error)
|
||||
if err := cfg.Validate(); err != nil {
|
||||
logger.Logger.Error().
|
||||
Err(err).
|
||||
Msg("Configuration validation failed")
|
||||
fmt.Fprintf(os.Stderr, "Error: Invalid configuration: %v. Please fix the config file and try again.\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
sc, err := steamcache.New(
|
||||
cfg.ListenAddress,
|
||||
cfg.Cache.Memory.Size,
|
||||
cfg.Cache.Disk.Size,
|
||||
@@ -118,7 +127,16 @@ var rootCmd = &cobra.Command{
|
||||
cfg.Cache.Disk.GCAlgorithm,
|
||||
finalMaxConcurrentRequests,
|
||||
finalMaxRequestsPerClient,
|
||||
cfg.MaxObjectSize,
|
||||
cfg.TrustedProxies,
|
||||
)
|
||||
if err != nil {
|
||||
logger.Logger.Error().
|
||||
Err(err).
|
||||
Msg("Failed to initialize steamcache")
|
||||
fmt.Fprintf(os.Stderr, "Error: Failed to initialize steamcache: %v. Check sizes in config.\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
logger.Logger.Info().
|
||||
Msg("steamcache2 " + version.Version + " started on " + cfg.ListenAddress)
|
||||
|
||||
Reference in New Issue
Block a user