projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a2696f
)
Internally use full paths when loading modules.
author
Ryan
<ry@tinyclouds.org>
Mon, 7 Sep 2009 12:09:18 +0000
(14:09 +0200)
committer
Ryan
<ry@tinyclouds.org>
Mon, 7 Sep 2009 12:46:56 +0000
(14:46 +0200)
This completes shebang support begun in
6acac912dd4da0479a0630a8d1b2878ca83b22de
.
src/node.js
patch
|
blob
|
history
diff --git
a/src/node.js
b/src/node.js
index
f6d0a4a
..
5cab833
100644
(file)
--- a/
src/node.js
+++ b/
src/node.js
@@
-202,6
+202,15
@@
node.Module.prototype.waitChildrenLoad = function (callback) {
};
(function () {
+ // Make ARGV[0] and ARGV[1] into full paths.
+ if (ARGV[0].charAt(0) != "/") {
+ ARGV[0] = node.path.join(node.cwd(), ARGV[0]);
+ }
+
+ if (ARGV[1].charAt(0) != "/") {
+ ARGV[1] = node.path.join(node.cwd(), ARGV[1]);
+ }
+
// Load the root module--the command line argument.
var root_module = new node.Module({
path: node.path.filename(ARGV[1]),