Skip to content

Commit 13c3a73

Browse files
committed
handle empty path strings in fs polyfill and remove redundant comment in worker command
1 parent 2bb9a00 commit 13c3a73

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

  • crates
    • capsule-cli/src/commands
    • capsule-sdk/javascript/src/polyfills

crates/capsule-cli/src/commands/worker.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ pub async fn execute() -> Result<(), WorkerError> {
7373
let runtime = Runtime::new(runtime_config, capsule_toml)
7474
.map_err(|e| WorkerError::RuntimeError(e.to_string()))?;
7575

76-
// Cache wasm_path per source file so fingerprint checks only run once per file.
7776
let wasm_cache: Arc<Mutex<HashMap<String, PathBuf>>> = Arc::new(Mutex::new(HashMap::new()));
7877

7978
let stdin = tokio::io::stdin();

crates/capsule-sdk/javascript/src/polyfills/fs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function normalizePath(path: string): string {
7878
else if (p.startsWith('/')) p = p.slice(1);
7979
if (p.length > 1) p = p.replace(/\/+$/, '');
8080

81-
return p;
81+
return p || '.';
8282
}
8383

8484
/**

0 commit comments

Comments
 (0)