vfox add --source fails with a raw rename error when VFOX_HOME does not exist
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Empieza en internal/pathmeta/path_meta.go alrededor de las líneas 143-146, donde $HOME/.vfox/tmp se crea con os.MkdirAll, mientras que los directorios de instalaciones y plugins de VFOX_HOME usan os.Mkdir y se ignoran los errores. El error aparece en internal/manager.go:563. Para reproducirlo, establece VFOX_HOME en un directorio que no exista y ejecuta vfox add --source sobre un zip de plugin. Está terminado cuando VFOX_HOME se crea con MkdirAll, o cuando add falla pronto con un mensaje que menciona VFOX_HOME, y los errores ya no se descartan.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
With VFOX_HOME set to a directory that does not exist, vfox add --source validates the plugin, then fails with an operating system error. docs/guides/multi-user-sharing.md asks users to create the directory first (mkdir -p /opt/vfox, then export VFOX_HOME=/opt/vfox). The error does not name VFOX_HOME, and the code that should create the directories ignores its errors.
Reproduction on a GitHub-hosted runner (Ubuntu 26.04.1, x86_64) with the vfox 1.1.0 release archive (checksum verified) and the zip archive of the vfox-etcd v0.2.3 tag. Run: https://github.com/version-fox/vfox-plus/actions/runs/45056971190
VFOX_HOME="$W/no-such-dir/vfox-home" vfox add --source vfox-etcd-v0.2.3.zip
# exit 1
# stdout: Validating .../vfox-etcd-v0.2.3.zip ...
# stderr: install plugin error: rename .../.vfox/tmp/vfox-4056581461 .../no-such-dir/vfox-home/plugin/etcd: no such file or directory
mkdir -p "$W/no-such-dir/vfox-home"
VFOX_HOME="$W/no-such-dir/vfox-home" vfox add --source vfox-etcd-v0.2.3.zip
# exit 0
The same error occurs when only VFOX_HOME itself is missing and its parent exists (checked on Linux with vfox 1.1.0).
Without VFOX_HOME, a HOME that has no .vfox yet works: vfox add --source exits 0, because $HOME/.vfox is created.
With the same missing VFOX_HOME, vfox list exits 1 with you don't have any sdk installed yet, which does not say that the directory is missing.
Cause: internal/pathmeta/path_meta.go:143 creates $HOME/.vfox/tmp with os.MkdirAll, but path_meta.go:145-146 create the installs and plugin directories of VFOX_HOME with os.Mkdir, which does not create parents, and ignore its error (_ = os.Mkdir(...)). The rename of the validated plugin into plugin/ then fails, and internal/manager.go:563 wraps it as install plugin error.
Expected: VFOX_HOME is created, or add stops before the download with a message that names VFOX_HOME.
Severity: low. The directory is a documented step, so this concerns the error message and the ignored errors.
- Lenguaje dominante
- Go
- Estrellas
- 4k
- Forks
- 177
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 31
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de version-fox/vfox
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
version-fox/vfox#823 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 Medio día Aptitud para principiantes 45/100
version-fox/vfox#824 ·
Los mantenedores suelen responder en 1 día
-
Plugins fail to load when the HOME path contains ';' or '?' (Lua package.path)Posiblemente ocupada @Xnadir la tomó hoy. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
version-fox/vfox#821 ·
Los mantenedores suelen responder en 1 día
-
[BUG]: the Available cache ignores the environment, so one setting's list is shown for anotherPosiblemente ocupada @nanami7777777 la tomó hoy. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
version-fox/vfox#816 ·
Los mantenedores suelen responder en 1 día
-
[Feature]: treat two names of one install as the same versionPosiblemente ocupada @Detoy la tomó hoy. Abiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
version-fox/vfox#814 ·
Los mantenedores suelen responder en 1 día
Todos los issues de version-fox/vfox
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
seaweedfs/seaweed-block#443 ·
Los mantenedores suelen responder en 1 día
-
HTTP `batch.Send` returns nil and inserts no rows when the block does not encodePosiblemente ocupada @Indian-boult la tomó hoy. Abiertobug queries
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ClickHouse/clickhouse-go#2155 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
transparency-dev/tessera#1286 ·
Los mantenedores suelen responder en 1 día