Skip to content

datasette publish can fail if /tmp is on a different device #141

@jacobian

Description

@jacobian

datasette publish uses hard links to avoid copying the db into a tmp directory. This can fail if /tmp is on another device, because hardlinks can't cross devices. You'll see something like this:

$ datasette publish heroku whatever.db
...
OSError: [Errno 18] Invalid cross-device link: '/mnt/c/Users/jacob/c/datasette/whatever.db' -> '/tmp/tmpvxq2yof6/whatever.db'

[In my case this is failing because I'm on a Windows machine, using WSL, so my code's on a different virtual filesystem from the Linux subsystem, Because Reasons.]

I'm not sure if it's possible to detect this (can you figure out which device /tmp is on?), or what the fallback should be (soft link? copy?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions