summaryrefslogtreecommitdiff
path: root/cli/standalone/virtual_fs.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-11-19 16:19:35 -0500
committerGitHub <noreply@github.com>2024-11-19 16:19:35 -0500
commit46b6037644c761369e689704f8e7b857959da155 (patch)
treea863a8ad6f91a8907d96f50215105a478c6d53ff /cli/standalone/virtual_fs.rs
parentc55e936be03a3a023330789f903e2fbd12f4a308 (diff)
feat(compile): ability to embed local data files (#26934)
``` > deno compile --allow-read=. --include data-file.txt main.js ``` This only applies to files on the filesystem. For remote modules, that's going to have to wait for `import ... from "./data.txt" with { "type": "bytes" }` or whatever it will be.
Diffstat (limited to 'cli/standalone/virtual_fs.rs')
-rw-r--r--cli/standalone/virtual_fs.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/standalone/virtual_fs.rs b/cli/standalone/virtual_fs.rs
index 26bb0db75..d1084f016 100644
--- a/cli/standalone/virtual_fs.rs
+++ b/cli/standalone/virtual_fs.rs
@@ -51,7 +51,8 @@ pub struct VfsBuilder {
impl VfsBuilder {
pub fn new(root_path: PathBuf) -> Result<Self, AnyError> {
- let root_path = canonicalize_path(&root_path)?;
+ let root_path = canonicalize_path(&root_path)
+ .with_context(|| format!("Canonicalizing {}", root_path.display()))?;
log::debug!("Building vfs with root '{}'", root_path.display());
Ok(Self {
root_dir: VirtualDirectory {