Shutting down removes comments from config.yml

Abierto
#76 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java
Área
backend

Línea de trabajo

The issue identifies Warehouse.saveConfig and the shipped config.yml; start by locating that method and tracing what calls it during startup and shutdown. Check where default stores are set and saved, then verify that starting and stopping the server leaves config.yml unchanged.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Problem

Every clean shutdown rewrites config.yml and removes its comments, including the shipped notes about default stores and custom messages. Warehouse.saveConfig saves the config with a YAML loader that doesn't keep comments.

Confirmed by loading and saving the shipped config.yml: the file had comments before and none after.

Enabling comments in the loader won't keep commented-out example lines, because those aren't attached to any setting.

Scope

  • Only write config.yml when something changed it, such as setting a default store. Better still, move runtime values like default stores into store data, so the plugin never rewrites the admin's file.

Done when

  • Starting and stopping the server leaves config.yml unchanged.
Lenguaje dominante
Java
Estrellas
1
Forks
0
Merge medio
2 h 35 min
PR fusionados (30 d)
14

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de BrendonButler/Shops

Todos los issues de BrendonButler/Shops

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.