summaryrefslogtreecommitdiff
path: root/deno_dir.go
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-05-28 09:48:33 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-05-28 11:20:32 -0400
commit6a489daa0206abecdae240d5e2ac4739a5682896 (patch)
tree641d72971404b76797e84192992e71775b6a49a9 /deno_dir.go
parent6097f871542dcd8486ef1a7c508f0f373297c74a (diff)
Better handle remote urls in ResolveModule
Diffstat (limited to 'deno_dir.go')
-rw-r--r--deno_dir.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/deno_dir.go b/deno_dir.go
index 60378f689..84ead16f7 100644
--- a/deno_dir.go
+++ b/deno_dir.go
@@ -34,8 +34,9 @@ func CacheFileName(filename string, sourceCodeBuf []byte) string {
// Fetches a remoteUrl but also caches it to the localFilename.
func FetchRemoteSource(remoteUrl string, localFilename string) ([]byte, error) {
- //println("FetchRemoteSource", remoteUrl)
- assert(strings.HasPrefix(localFilename, SrcDir), localFilename)
+ logDebug("FetchRemoteSource %s %s", remoteUrl, localFilename)
+ assert(strings.HasPrefix(localFilename, SrcDir),
+ "Expected filename to start with SrcDir: "+localFilename)
var sourceReader io.Reader
file, err := os.Open(localFilename)