Skip to content

Setup should not use an absolute path to set the migrations_directory 'dir' field of diesel.toml #4436

@the-solid-box

Description

@the-solid-box

Setup

Versions

  • Rust: 1.83.0
  • Diesel: 2.2.6
  • Database: PostgreSQL 17.0

Problem Description

The diesel setup command sets the migrations_directory dir field of the diesel.toml file to an absolute path, which both leaks personal information (at least the username of the user running the setup command) and breaks it when the local repository has a different path (for instance, when cloned by another team member).

Since it seems to be working perfectly fine with a relative path, I think it would be recommendable to have diesel setup set the migrations directory using a path relative to the root of the crate.

Checklist

  • This issue can be reproduced on Rust's stable channel. (Your issue will be
    closed if this is not the case)
  • This issue can be reproduced without requiring a third party crate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions