Skip to content

Skip default log directory when logging is disabled or configured externally #361

Open

Description

@longlho

Copybara fails at startup when its default log directory is read-only, even with --nologging or -Djava.util.logging.config.file=... pointing to a console-only config.

For example, running with a read-only home on Linux fails with:

/root/.cache/com.google.copybara: Read-only file system

Main.configureLog() calls Files.createDirectories() before checking either setting. Could it only create that directory when using its default file logger?

Setting XDG_CACHE_HOME to a writable directory works around this on Linux. Reproduced with v20261019; current main has the same code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions