a-b-street/abstreet · error
Your current directory doesn't have the data/ directory…
Error message
Your current directory doesn't have the data/ directory. Run from the git root: cd ../; cargo run --bin updater -- args
What it means
The updater binary requires the current working directory to be the repository root, because it reads and writes the data/ tree. At startup it checks that data/ exists and panics with instructions if not.
Solutions
- cd to the git repository root before running the updater
- Ensure data/ exists at the repo root (run the data setup/import steps if the repo was freshly cloned without data)
- In CI/scripts, set working-directory to the repo root
Example fix
// before (from updater/) cargo run --bin updater -- args // after (from git root) cd .. cargo run --bin updater -- args
Defensive patterns
Strategy: validation
Validate before calling
if !std::path::Path::new("data").exists() {
eprintln!("run from the git root");
std::process::exit(1);
} Prevention
- Always run updater from the repo root; wrap invocations in scripts that cd first
- Set working-directory in CI to the repo root
- Ensure data/ exists before invoking the updater
When it happens
Trigger: Running `cargo run --bin updater` from any directory other than the git root, so `data/` is not a relative path in the CWD.
Common situations: Developers running the updater from within updater/src, a CI step with the wrong working directory, or after cloning without data/ present.
Related errors
- Can't find the data/ directory
- You forgot to call initialize on SimFlags after parsing…
- This build of A/B Street stores player data in…
- CityName::new( , ) has a country code that isn't two letters
- Couldn't read_json( )
AI-assisted analysis of a-b-street/abstreet@0964f29315 (2026-09-13).
Data as JSON: /api/errors/4a2269f9b80a3448.
Report an issue: GitHub.
Appendix: source
Thrown at updater/src/main.rs:64
minimal: bool,
/// Only update files from the manifest. Leave extra files alone.
#[structopt(long)]
dont_delete: bool,
/// Only useful for Dustin. "Download" from my local S3 source-of-truth, not from the
/// network.
#[structopt(long)]
dl_from_local: bool,
/// Download data tied to a named release. See
/// https://a-b-street.github.io/docs/tech/dev/data.html.
#[structopt(long, default_value = "dev")]
version: String,
},
}
#[tokio::main]
async fn main() {
if !std::path::Path::new("data").exists() {
panic!("Your current directory doesn't have the data/ directory. Run from the git root: cd ../; cargo run --bin updater -- args");
}
abstutil::logger::setup();
match Task::from_args() {
Task::Upload => {
upload("dev");
}
Task::IncrementalUpload { version } => {
// We DON'T want to override the main data immediately from the batch Docker jobs. If
// running locally, can temporarily disable this assertion.
assert_ne!(version, "dev");
incremental_upload(version);
}
Task::DryRun { single_file } => {
if let Some(path) = single_file {
let local = md5sum(&path);
let truth = Manifest::load()
.entriesView on GitHub (pinned to 0964f29315)