clockworklabs/SpacetimeDB · error

Failed to retrieve current directory

Error message

Failed to retrieve current directory

What it means

Error "Failed to retrieve current directory" thrown in clockworklabs/SpacetimeDB.

Source

Thrown at crates/cli/src/tasks/csharp.rs:505

                            "{}{}{}",
                            "  ".repeat(depth + 1),
                            name,
                            if path.is_dir() { "/" } else { "" }
                        );
                        if path.is_dir() {
                            list_recursive(&path, depth + 1);
                        }
                    }
                }
            }
            list_recursive(&bin_dir, 0);
        }
    }
    anyhow::bail!("Built project successfully but couldn't find the output file.");
}

pub(crate) fn dotnet_format(project_dir: &Path, files: impl IntoIterator<Item = PathBuf>) -> anyhow::Result<()> {
    let cwd = std::env::current_dir().expect("Failed to retrieve current directory");
    duct::cmd(
        "dotnet",
        itertools::chain(
            [
                "format",
                // We can't guarantee that the output lives inside a valid project or solution,
                // so to avoid crash we need to use the `dotnet whitespace --folder` mode instead
                // of a full style-aware formatter. Still better than nothing though.
                "whitespace",
                "--folder",
                project_dir.to_str().unwrap(),
                // Our files are marked with <auto-generated /> and will be skipped without this option.
                "--include-generated",
                "--include",
            ]
            .into_iter()
            .map_into::<OsString>(),
            // Resolve absolute paths for all of the files, because we receive them as relative paths to cwd, but

View on GitHub (pinned to 524b4487d9)

When it happens

Trigger: Thrown at crates/cli/src/tasks/csharp.rs:505 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16). Data as JSON: /api/errors/e676dc1192073b90. Report an issue: GitHub.