Closed
Bug 399775
Opened 18 years ago
Closed 7 years ago
Global load() doesn't subsitute environment variables
Categories
(Rhino Graveyard :: Core, defect)
Rhino Graveyard
Core
Tracking
(Not tracked)
RESOLVED
INACTIVE
People
(Reporter: joshuaallen, Unassigned)
Details
Attachments
(4 files)
|
4.96 KB,
patch
|
Details | Diff | Splinter Review | |
|
662 bytes,
patch
|
Details | Diff | Splinter Review | |
|
1.63 KB,
text/plain
|
Details | |
|
3.24 KB,
text/plain
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7
Build Identifier: 1.6R7
org.mozilla.javascript.tools.shell.Global#load doesn't substitute environment variables for path names. So for example
Reproducible: Always
Steps to Reproduce:
1. Create a javascript file
2. Add a first line load("$JSDIR/core-util.js")
3. Run javascript
Actual Results:
Doesn't exapand $JSDIR
Expected Results:
Expands $JSDIR
I have a patch ready, I'll submit it once this bugs been submitted.
| Reporter | ||
Comment 1•18 years ago
|
||
Note that the patch to bug https://bugzilla.mozilla.org/show_bug.cgi?id=368323 should also be applied because this solution uses runProcess.
Attachment #284848 -
Flags: review?
| Reporter | ||
Comment 2•18 years ago
|
||
| Reporter | ||
Comment 3•18 years ago
|
||
French translation to addition to Message.properties
| Reporter | ||
Comment 4•18 years ago
|
||
Unit tests for org.mozilla.javascript.tools.shell.Global#expandVars (JUnit 4)
Environments this was tested on:
CentOS release 4.5 (Final)
Microsoft Windows XP [Version 5.1.2600]
To be sure, it should be tested on the Mac too.
Last part of fix.
Comment 5•17 years ago
|
||
((I know it's an old bug, but it's not RESOLVED))
I don't see a reason for load to expand env variables.
This is JavaScript, not shell scripting, if you can't use env vars the issue is a function for getting env vars is needed inside the shell so that you can grab the value of an env var and + it onto a path. load() is supposed to take a legal path to a file, NOT expected to follow shell substitution rules which rather than being helpful could result in gotchas where paths are substituted where they shouldn't be.
Recommend WONTFIX. You can already access env variables through LiveConnect.
Updated•12 years ago
|
Attachment #284848 -
Flags: review?
Comment 6•7 years ago
|
||
Closing. Bug management is now done here:
https://github.com/mozilla/rhino
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•